Ignore:
Timestamp:
2014-01-06T16:39:45+01:00 (12 years ago)
Author:
Don-vip
Message:

global replacement of e.printStackTrace() by Main.error(e)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r6615 r6643  
    560560            msg = null;
    561561        } 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);
    572563            if (e.getCause() instanceof ClassNotFoundException) {
    573564                msg = tr("<html>Could not load plugin {0} because the plugin<br>main class ''{1}'' was not found.<br>"
     
    575566            }
    576567        }  catch (Throwable e) {
    577             e.printStackTrace();
     568            Main.error(e);
    578569        }
    579570        if (msg != null && confirmDisablePlugin(parent, msg, plugin.name)) {
     
    687678                future.get();
    688679            } catch(ExecutionException e) {
    689                 e.printStackTrace();
     680                Main.error(e);
    690681                return null;
    691682            } catch(InterruptedException e) {
     
    817808                } catch (PluginException e) {
    818809                    Main.warn(tr("Failed to find plugin {0}", name));
    819                     e.printStackTrace();
     810                    Main.error(e);
    820811                }
    821812            }
     
    858849            } catch (ExecutionException e) {
    859850                Main.warn(tr("Failed to download plugin information list")+": ExecutionException");
    860                 e.printStackTrace();
     851                Main.error(e);
    861852                // don't abort in case of error, continue with downloading plugins below
    862853            } catch (InterruptedException e) {
     
    905896                    future.get();
    906897                } catch(ExecutionException e) {
    907                     e.printStackTrace();
     898                    Main.error(e);
    908899                    alertFailedPluginUpdate(parent, pluginsToUpdate);
    909900                    return plugins;
     
    10981089                pi.updateFromJar(new PluginInformation(downloadedPluginFile, pi.name));
    10991090            } catch(PluginException e) {
    1100                 e.printStackTrace();
     1091                Main.error(e);
    11011092            }
    11021093        }
Note: See TracChangeset for help on using the changeset viewer.