Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

I get a stack trace with the error message “Error during execution” or “Called method threw an exception.” Whats going on?

Error going message stack trace
0
10 Posted

I get a stack trace with the error message “Error during execution” or “Called method threw an exception.” Whats going on?

0
10

While Jess was running, it called a Java method that threw an exception other than JessException. Because Jess’s methods are declared to only throw JessException, Jess had to wrap the foreign exception inside a JessException and rethrow it. Thus the exception you’re looking at is just a wrapper for the real problem exception. The JessException class has a method getCause which returns non-null when a particular JessException is a wrapper for a foreign exception. JessException.getCause() will return the real exception that was thrown. Your JessException handlers should always check getCause(); if your handler simply displays a thrown exception, then it should display the return value of getCause(), too.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123