cbuschka / beanshell2

Automatically exported from code.google.com/p/beanshell2
0 stars 0 forks source link

Nested exception is converted to message and can not be retrieved #79

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Throw a java exception in script.
2. Get the detailed exception as root cause from the wrapping exception
3.

What is the expected output? What do you see instead?
Expect to get the root cause exception. But the nested exception is converted 
to message, and lost.

Please use labels and text to provide additional information.
It's not using the java exception chain mechanism, which is a nice feature for 
servceability.

Original issue reported on code.google.com by verilo...@gmail.com on 12 Oct 2012 at 7:03

GoogleCodeExporter commented 8 years ago
Example:

try {
    new Interpreter().eval("class A{A(){throw new RuntimeException(\"The root cause\");}} new A();");
} catch (Exception e) {
    e.printStackTrace();
}

Original comment by verilo...@gmail.com on 12 Oct 2012 at 7:15

GoogleCodeExporter commented 8 years ago
This happens only in class initialization...

Original comment by verilo...@gmail.com on 12 Oct 2012 at 7:15

GoogleCodeExporter commented 8 years ago

Original comment by verilo...@gmail.com on 12 Oct 2012 at 7:36