We are embedding bsh into an application to provide a
scripting capability to our software. I'm currently
trying to fix up the error handling capabilities.
Right now bsh seems to always add the entire contents
of the script to the exception message, making the
Exception almost completely unreadable. I've caught
the EvalError and been able to chop it into a more
readable version using .getErrorLineNumber() and
getErrorText(), except that there seems to be no way to
get at the actual error message without also getting
the entire contents of the string passed to
Interpreter.eval() because something somewhere has
called prependMessage() with the contents of the
evaluation. Is there a clean way to handle this?
Log in to post a comment.