mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
pass actual exceptions from InvocationTargetException in registered methods
This commit is contained in:
@@ -849,7 +849,12 @@ public class PApplet extends Applet
|
||||
//System.out.println(objects[i] + " " + args);
|
||||
methods[i].invoke(objects[i], oargs);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
if (e instanceof InvocationTargetException) {
|
||||
InvocationTargetException ite = (InvocationTargetException) e;
|
||||
ite.getTargetException().printStackTrace();
|
||||
} else {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2969,14 +2974,12 @@ public class PApplet extends Applet
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
case 'D': // double
|
||||
double dd[] = (double[]) what;
|
||||
for (int i = 0; i < dd.length; i++) {
|
||||
System.out.println("[" + i + "] " + dd[i]);
|
||||
}
|
||||
break;
|
||||
*/
|
||||
|
||||
default:
|
||||
System.out.println(what);
|
||||
|
||||
Reference in New Issue
Block a user