mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
couple tweaks for Mode debugging
This commit is contained in:
@@ -397,13 +397,18 @@ public class Base {
|
||||
contribModes.add(new ModeContribution(this, folder, null));
|
||||
} catch (NoSuchMethodError nsme) {
|
||||
System.err.println(folder.getName() + " is not compatible with this version of Processing");
|
||||
if (DEBUG) nsme.printStackTrace();
|
||||
} catch (NoClassDefFoundError ncdfe) {
|
||||
System.err.println(folder.getName() + " is not compatible with this version of Processing");
|
||||
if (DEBUG) ncdfe.printStackTrace();
|
||||
} catch (InvocationTargetException ite) {
|
||||
System.err.println(folder.getName() + " could not be loaded and may not compatible with this version of Processing");
|
||||
if (DEBUG) ite.printStackTrace();
|
||||
} catch (IgnorableException ig) {
|
||||
Messages.log(ig.getMessage());
|
||||
if (DEBUG) ig.printStackTrace();
|
||||
} catch (Throwable e) {
|
||||
System.err.println("Could not load Mode from " + folder);
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -137,11 +137,11 @@ public class ModeContribution extends LocalContribution {
|
||||
return loader.equals(other.loader) && mode.equals(other.getMode());
|
||||
}
|
||||
|
||||
public String initLoader(Base base, String className) throws Exception {
|
||||
|
||||
public String initLoader(Base base, String className) throws Exception {
|
||||
File modeDirectory = new File(folder, getTypeName());
|
||||
if (modeDirectory.exists()) {
|
||||
Messages.log("checking mode folder regarding " + className);
|
||||
Messages.log("checking mode folder regarding class name " + className);
|
||||
// If no class name specified, search the main <modename>.jar for the
|
||||
// full name package and mode name.
|
||||
if (className == null) {
|
||||
@@ -170,7 +170,7 @@ public class ModeContribution extends LocalContribution {
|
||||
installedModes.put(m.getClass().getName(), m);
|
||||
}
|
||||
|
||||
for(String modeImport: imports){
|
||||
for (String modeImport: imports) {
|
||||
if (installedModes.containsKey(modeImport)) {
|
||||
Messages.log("Found mode dependency " + modeImport);
|
||||
File modeFolder = installedModes.get(modeImport).getFolder();
|
||||
@@ -182,8 +182,9 @@ public class ModeContribution extends LocalContribution {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new IgnorableException("Dependency mode "+ modeImport + " could not be"
|
||||
+ " found. Can't load " + className);
|
||||
throw new IgnorableException("Can't load " + className +
|
||||
" because the import " + modeImport +
|
||||
" could not be found. ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user