mirror of
https://github.com/processing/processing4.git
synced 2026-01-27 18:31:07 +01:00
Make error message dynamic
This commit is contained in:
@@ -774,10 +774,11 @@ public class Runner implements MessageConsumer {
|
||||
err.println("and your code should be rewritten in a more efficient manner.");
|
||||
|
||||
} else if (exceptionClass.equals("java.lang.UnsupportedClassVersionError")) {
|
||||
int javaVersion = Runtime.version().feature();
|
||||
listener.statusError("UnsupportedClassVersionError: A library is using code compiled with an unsupported version of Java.");
|
||||
err.println("This version of Processing only supports libraries and JAR files compiled for Java 17 or earlier.");
|
||||
err.println("A library used by this sketch was compiled for Java 18 or later, ");
|
||||
err.println("and needs to be recompiled to be compatible with Java 17.");
|
||||
err.println("This version of Processing only supports libraries and JAR files compiled for Java " + javaVersion + " or earlier.");
|
||||
err.println("A library used by this sketch was compiled for Java " + (javaVersion + 1) + " or later, ");
|
||||
err.println("and needs to be recompiled to be compatible with Java " + javaVersion + ".");
|
||||
|
||||
} else if (exceptionClass.equals("java.lang.NoSuchMethodError") ||
|
||||
exceptionClass.equals("java.lang.NoSuchFieldError")) {
|
||||
|
||||
Reference in New Issue
Block a user