Changeset 12599 in josm


Ignore:
Timestamp:
2017-08-14T13:25:17+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #15150 - catch NoClassDefFoundError in PluginProxy

Location:
trunk/src/org/openstreetmap/josm/plugins
Files:
2 edited

Legend:

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

    r12323 r12599  
    287287     * All exceptions that occured during plugin loading
    288288     */
    289     static final Map<String, Exception> pluginLoadingExceptions = new HashMap<>();
     289    static final Map<String, Throwable> pluginLoadingExceptions = new HashMap<>();
    290290
    291291    /**
  • trunk/src/org/openstreetmap/josm/plugins/PluginProxy.java

    r12322 r12599  
    5656    }
    5757
    58     private void handlePluginException(Exception e) {
     58    private void handlePluginException(Throwable e) {
    5959        PluginHandler.pluginLoadingExceptions.put(getPluginInformation().name, e);
    6060        BugReportExceptionHandler.handleException(new PluginException(this, getPluginInformation().name, e));
     
    6868            Main.trace(e);
    6969            Main.debug("Plugin "+plugin+" does not define mapFrameInitialized");
    70         } catch (ReflectiveOperationException | IllegalArgumentException e) {
     70        } catch (ReflectiveOperationException | IllegalArgumentException | NoClassDefFoundError e) {
    7171            handlePluginException(e);
    7272        }
     
    8181            Main.debug("Plugin "+plugin+" does not define getPreferenceSetting");
    8282            return null;
    83         } catch (ReflectiveOperationException | IllegalArgumentException e) {
     83        } catch (ReflectiveOperationException | IllegalArgumentException | NoClassDefFoundError e) {
    8484            handlePluginException(e);
    8585        }
     
    9494            Main.trace(e);
    9595            Main.debug("Plugin "+plugin+" does not define addDownloadSelection");
    96         } catch (ReflectiveOperationException | IllegalArgumentException e) {
     96        } catch (ReflectiveOperationException | IllegalArgumentException | NoClassDefFoundError e) {
    9797            handlePluginException(e);
    9898        }
Note: See TracChangeset for help on using the changeset viewer.