Changeset 6643 in josm for trunk/src/org/openstreetmap/josm/plugins
- Timestamp:
- 2014-01-06T16:39:45+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/plugins
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginDownloadTask.java
r6248 r6643 163 163 download(d, pluginFile); 164 164 } catch(PluginDownloadException e) { 165 e.printStackTrace();165 Main.error(e); 166 166 failed.add(d); 167 167 continue; -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r6615 r6643 560 560 msg = null; 561 561 } catch (PluginException e) { 562 Main.error(e.getMessage()); 563 Throwable cause = e.getCause(); 564 if (cause != null) { 565 msg = cause.getLocalizedMessage(); 566 if (msg != null) { 567 Main.error("Cause: " + cause.getClass().getName()+": " + msg); 568 } else { 569 cause.printStackTrace(); 570 } 571 } 562 Main.error(e); 572 563 if (e.getCause() instanceof ClassNotFoundException) { 573 564 msg = tr("<html>Could not load plugin {0} because the plugin<br>main class ''{1}'' was not found.<br>" … … 575 566 } 576 567 } catch (Throwable e) { 577 e.printStackTrace();568 Main.error(e); 578 569 } 579 570 if (msg != null && confirmDisablePlugin(parent, msg, plugin.name)) { … … 687 678 future.get(); 688 679 } catch(ExecutionException e) { 689 e.printStackTrace();680 Main.error(e); 690 681 return null; 691 682 } catch(InterruptedException e) { … … 817 808 } catch (PluginException e) { 818 809 Main.warn(tr("Failed to find plugin {0}", name)); 819 e.printStackTrace();810 Main.error(e); 820 811 } 821 812 } … … 858 849 } catch (ExecutionException e) { 859 850 Main.warn(tr("Failed to download plugin information list")+": ExecutionException"); 860 e.printStackTrace();851 Main.error(e); 861 852 // don't abort in case of error, continue with downloading plugins below 862 853 } catch (InterruptedException e) { … … 905 896 future.get(); 906 897 } catch(ExecutionException e) { 907 e.printStackTrace();898 Main.error(e); 908 899 alertFailedPluginUpdate(parent, pluginsToUpdate); 909 900 return plugins; … … 1098 1089 pi.updateFromJar(new PluginInformation(downloadedPluginFile, pi.name)); 1099 1090 } catch(PluginException e) { 1100 e.printStackTrace();1091 Main.error(e); 1101 1092 } 1102 1093 } -
trunk/src/org/openstreetmap/josm/plugins/PluginInformation.java
r6615 r6643 248 248 } 249 249 } 250 catch(Exception e) { e.printStackTrace(); }250 catch(Exception e) { Main.error(e); } 251 251 } 252 252 } -
trunk/src/org/openstreetmap/josm/plugins/PluginListParser.java
r6552 r6643 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.plugins; 3 4 import org.openstreetmap.josm.tools.Utils;5 3 6 4 import static org.openstreetmap.josm.tools.I18n.tr; … … 13 11 import java.util.LinkedList; 14 12 import java.util.List; 13 14 import org.openstreetmap.josm.Main; 15 import org.openstreetmap.josm.tools.Utils; 15 16 16 17 /** … … 104 105 } 105 106 } catch (PluginListParseException ex) { 106 ex.printStackTrace();107 Main.error(ex); 107 108 } 108 109 } -
trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
r6248 r6643 92 92 } catch(PluginListParseException e) { 93 93 Main.warn(tr("Failed to scan file ''{0}'' for plugin information. Skipping.", fname)); 94 e.printStackTrace();94 Main.error(e); 95 95 } 96 96 monitor.worked(1); -
trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
r6552 r6643 181 181 } catch (MalformedURLException e) { 182 182 if (canceled) return null; 183 e.printStackTrace();183 Main.error(e); 184 184 return null; 185 185 } catch (IOException e) { … … 234 234 JosmTextArea area = new JosmTextArea(details); 235 235 area.setEditable(false); 236 area.setLineWrap(true); 237 area.setWrapStyleWord(true); 236 area.setLineWrap(true); 237 area.setWrapStyleWord(true); 238 238 JScrollPane scrollPane = new JScrollPane(area); 239 239 scrollPane.setPreferredSize(new Dimension(500, 300)); … … 273 273 } catch (MalformedURLException e) { 274 274 if (canceled) return; 275 e.printStackTrace();275 Main.error(e); 276 276 return; 277 277 } catch (IOException e) { … … 322 322 } catch(IOException e) { 323 323 // just failed to write the cache file. No big deal, but log the exception anyway 324 e.printStackTrace();324 Main.error(e); 325 325 } finally { 326 326 if (writer != null) { … … 367 367 } catch (PluginListParseException e) { 368 368 Main.error(tr("Failed to parse plugin list document from site ''{0}''. Skipping site. Exception was: {1}", site, e.toString())); 369 e.printStackTrace();369 Main.error(e); 370 370 } 371 371 }
Note:
See TracChangeset
for help on using the changeset viewer.