Changeset 6248 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2013-09-23T16:47:50+02:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/tools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/ExceptionUtil.java
r6232 r6248 370 370 try { 371 371 closeDate = formatter.parse(m.group(2)); 372 } catch(ParseException ex) { 373 System.err.println(tr("Failed to parse date ''{0}'' replied by server.", m.group(2)));372 } catch (ParseException ex) { 373 Main.error(tr("Failed to parse date ''{0}'' replied by server.", m.group(2))); 374 374 ex.printStackTrace(); 375 375 } -
trunk/src/org/openstreetmap/josm/tools/I18n.java
r6084 r6248 5 5 import java.io.File; 6 6 import java.io.FileInputStream; 7 import java.io.IOException; 7 8 import java.io.InputStream; 8 import java.io.IOException;9 9 import java.net.URL; 10 10 import java.text.MessageFormat; … … 14 14 import java.util.Comparator; 15 15 import java.util.HashMap; 16 import java.util.Locale; 16 17 import java.util.jar.JarInputStream; 17 18 import java.util.zip.ZipEntry; 18 import java.util.Locale;19 19 20 20 import javax.swing.JColorChooser; … … 641 641 } else { 642 642 if (!l.getLanguage().equals("en")) { 643 System.out.println(tr("Unable to find translation for the locale {0}. Reverting to {1}.",643 Main.info(tr("Unable to find translation for the locale {0}. Reverting to {1}.", 644 644 l.getDisplayName(), Locale.getDefault().getDisplayName())); 645 645 } else { -
trunk/src/org/openstreetmap/josm/tools/ImageProvider.java
r6246 r6248 308 308 } else { 309 309 if (!suppressWarnings) { 310 System.err.println(tr("Failed to locate image ''{0}''", name));310 Main.error(tr("Failed to locate image ''{0}''", name)); 311 311 } 312 312 return null; … … 613 613 } 614 614 } catch (Exception e) { 615 System.err.println(tr("Warning: failed to handle zip file ''{0}''. Exception was: {1}", archive.getName(), e.toString()));615 Main.warn(tr("Failed to handle zip file ''{0}''. Exception was: {1}", archive.getName(), e.toString())); 616 616 } finally { 617 617 Utils.close(zipFile); … … 671 671 return u; 672 672 } catch (SecurityException e) { 673 System.out.println(tr(674 " Warning: failed to access directory ''{0}'' for security reasons. Exception was: {1}",673 Main.warn(tr( 674 "Failed to access directory ''{0}'' for security reasons. Exception was: {1}", 675 675 name, e.toString())); 676 676 } … … 685 685 return u; 686 686 } catch (SecurityException e) { 687 System.out.println(tr(688 " Warning: failed to access directory ''{0}'' for security reasons. Exception was: {1}", dir, e687 Main.warn(tr( 688 "Failed to access directory ''{0}'' for security reasons. Exception was: {1}", dir, e 689 689 .toString())); 690 690 } … … 736 736 @Override 737 737 public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { 738 System.out.println();739 738 if (localName.equalsIgnoreCase("img")) { 740 739 String val = atts.getValue("src"); … … 759 758 return r.getResult(); 760 759 } catch (Exception e) { 761 System.out.println("INFO: parsing " + base + fn + " failed:\n" + e);760 Main.warn("Parsing " + base + fn + " failed:\n" + e); 762 761 return null; 763 762 } 764 System.out.println("INFO: parsing " + base + fn + " failed: Unexpected content.");763 Main.warn("Parsing " + base + fn + " failed: Unexpected content."); 765 764 return null; 766 765 } -
trunk/src/org/openstreetmap/josm/tools/OpenBrowser.java
r6070 r6248 51 51 // Workaround for KDE (Desktop API is severely flawed) 52 52 // see http://bugs.sun.com/view_bug.do?bug_id=6486393 53 System.err.println("Warning:Desktop class failed. Platform dependent fall back for open url in browser.");53 Main.warn("Desktop class failed. Platform dependent fall back for open url in browser."); 54 54 displayUrlFallback(uri); 55 55 } … … 60 60 } else { 61 61 try { 62 System.err.println("Warning:Desktop class is not supported. Platform dependent fall back for open url in browser.");62 Main.warn("Desktop class is not supported. Platform dependent fall back for open url in browser."); 63 63 displayUrlFallback(uri); 64 64 } catch (IOException e) { -
trunk/src/org/openstreetmap/josm/tools/PlatformHookOsx.java
r6125 r6248 40 40 MsetEnabledPreferencesMenu.invoke(Ocom_apple_eawt_Application, new Object[] { Boolean.TRUE }); 41 41 } catch (Exception ex) { 42 // Oops, what now? 43 // We'll just ignore this for now. The user will still be able to close JOSM 44 // by closing all its windows. 45 System.out.println("Failed to register with OSX: " + ex); 42 // We'll just ignore this for now. The user will still be able to close JOSM by closing all its windows. 43 Main.warn("Failed to register with OSX: " + ex); 46 44 } 47 45 } … … 49 47 public Object invoke (Object proxy, Method method, Object[] args) throws Throwable { 50 48 Boolean handled = Boolean.TRUE; 51 //System.out.println("Going to handle method "+method+" (short: "+method.getName()+") with event "+args[0]);52 49 if (method.getName().equals("handleQuit")) { 53 50 handled = Main.exitJosm(false, 0); … … 62 59 args[0].getClass().getDeclaredMethod("setHandled", new Class[] { boolean.class }).invoke(args[0], new Object[] { handled }); 63 60 } catch (Exception ex) { 64 System.out.println("Failed to report handled event: " + ex);61 Main.warn("Failed to report handled event: " + ex); 65 62 } 66 63 } … … 69 66 @Override 70 67 public void openUrl(String url) throws IOException { 71 // Ain't that KISS?72 68 Runtime.getRuntime().exec("open " + url); 73 69 } -
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r5979 r6248 371 371 if (potentialShortcut != null) { 372 372 // this always is a logic error in the hook 373 System.err.println("CONFLICT WITH SYSTEM KEY "+shortText);373 Main.error("CONFLICT WITH SYSTEM KEY "+shortText); 374 374 return null; 375 375 } … … 415 415 if ( findShortcut(k, newmodifier) == null ) { 416 416 Shortcut newsc = new Shortcut(shortText, longText, requestedKey, m, k, newmodifier, false, false); 417 System.out.println(tr("Silent shortcut conflict: ''{0}'' moved by ''{1}'' to ''{2}''.",417 Main.info(tr("Silent shortcut conflict: ''{0}'' moved by ''{1}'' to ''{2}''.", 418 418 shortText, conflict.getShortText(), newsc.getKeyText())); 419 419 newsc.saveDefault(); -
trunk/src/org/openstreetmap/josm/tools/XmlObjectParser.java
r6229 r6248 24 24 import javax.xml.validation.ValidatorHandler; 25 25 26 import org.openstreetmap.josm.Main; 26 27 import org.openstreetmap.josm.io.MirroredInputStream; 27 28 import org.xml.sax.Attributes; … … 296 297 } catch (SAXException e) { 297 298 // Exception very unlikely to happen, so no need to translate this 298 System.err.println("Cannot disable 'load-external-dtd' feature: "+e.getMessage());299 Main.error("Cannot disable 'load-external-dtd' feature: "+e.getMessage()); 299 300 } 300 301 reader.parse(new InputSource(in));
Note:
See TracChangeset
for help on using the changeset viewer.