Commit c86d893a authored by andrei's avatar andrei

Added better error reporting in case of UnsupportedClassVersionError

parent 57bd8bed
......@@ -124,7 +124,12 @@ public class TypedElement extends BufferedContent
} catch (IOException e) {
throw new CoreException(new Status(
IStatus.ERROR, "de.loskutov.bco", -1,
"cannot get bytecode dump", null));
"cannot get bytecode dump", e));
} catch (UnsupportedClassVersionError e){
throw new CoreException(new Status(
IStatus.ERROR, "de.loskutov.bco", -1,
"Error caused by attempt to load class compiled with Java version which"
+ " is not supported by current JVM", e));
} finally {
try {
stream.close();
......
......@@ -1294,6 +1294,11 @@ public class BytecodeOutlineView extends ViewPart {
// this is compilation problem - don't show the message
BytecodeOutlinePlugin.log(e1, IStatus.WARNING);
}
} catch (UnsupportedClassVersionError e) {
BytecodeOutlinePlugin
.error("Cannot decompile: " + type + ". Error was caused by attempt to " +
"load a class compiled with the Java version which is not " +
"supported by the current JVM. ", e);
} finally {
try {
is.close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment