mirror of
https://github.com/processing/processing4.git
synced 2026-02-02 13:21:07 +01:00
Re-wrap throwable if is not a runtime excepton, otherwise just throw original object for clearer error messages
This commit is contained in:
@@ -1013,7 +1013,11 @@ public class PGL {
|
||||
} catch (GLException e) {
|
||||
// Unwrap GLException so that only the causing exception is shown.
|
||||
Throwable tr = e.getCause();
|
||||
throw new RuntimeException(tr);
|
||||
if (tr instanceof RuntimeException) {
|
||||
throw (RuntimeException)tr;
|
||||
} else {
|
||||
throw new RuntimeException(tr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user