Changeset 8953 in josm for trunk/src/org/openstreetmap/josm/plugins
- Timestamp:
- 2015-10-27T14:47:00+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java
r8510 r8953 19 19 public class PluginProxy extends Plugin { 20 20 21 /** 22 * The plugin. 23 */ 21 24 public final Object plugin; 22 25 26 /** 27 * Constructs a new {@code PluginProxy}. 28 * @param plugin the plugin 29 * @param info the associated plugin info 30 */ 23 31 public PluginProxy(Object plugin, PluginInformation info) { 24 32 super(info); … … 26 34 } 27 35 28 @Override public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 36 private void handlePluginException(Exception e) { 37 PluginHandler.pluginLoadingExceptions.put(getPluginInformation().name, e); 38 BugReportExceptionHandler.handleException(new PluginException(this, getPluginInformation().name, e)); 39 } 40 41 @Override 42 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 29 43 try { 30 44 plugin.getClass().getMethod("mapFrameInitialized", MapFrame.class, MapFrame.class).invoke(plugin, oldFrame, newFrame); … … 32 46 Main.debug("Plugin "+plugin+" does not define mapFrameInitialized"); 33 47 } catch (Exception e) { 34 BugReportExceptionHandler.handleException(new PluginException(this, getPluginInformation().name, e));48 handlePluginException(e); 35 49 } 36 50 } 37 51 38 @Override public PreferenceSetting getPreferenceSetting() { 52 @Override 53 public PreferenceSetting getPreferenceSetting() { 39 54 try { 40 55 return (PreferenceSetting) plugin.getClass().getMethod("getPreferenceSetting").invoke(plugin); … … 43 58 return null; 44 59 } catch (Exception e) { 45 BugReportExceptionHandler.handleException(new PluginException(this, getPluginInformation().name, e));60 handlePluginException(e); 46 61 } 47 62 return null; 48 63 } 49 64 50 @Override public void addDownloadSelection(List<DownloadSelection> list) { 65 @Override 66 public void addDownloadSelection(List<DownloadSelection> list) { 51 67 try { 52 68 plugin.getClass().getMethod("addDownloadSelection", List.class).invoke(plugin, list); … … 54 70 Main.debug("Plugin "+plugin+" does not define addDownloadSelection"); 55 71 } catch (Exception e) { 56 BugReportExceptionHandler.handleException(new PluginException(this, getPluginInformation().name, e));72 handlePluginException(e); 57 73 } 58 74 }
Note:
See TracChangeset
for help on using the changeset viewer.