-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dealing with host exceptions #39
Comments
Note that I'm not using Nashorn compatibility mode. I probably should, but that'll only solve the |
Hi provegard, thanks for your report. We need to discuss that internally. I currently know of no way to access the original exception from JavaScript code, Truffle always wraps the exception in a CC @chumer |
Thank you! Note that the fact that there is a |
@woess has pushed a fix to expose the host exception directly. This should solve your problem. I am closing this, please reopen if the problem persists. -- Christian |
In which release? Do you mean that the code I posted will print message and stack? |
I'm having some trouble with host exceptions. Consider the following code:
It prints:
The problem is that a test framework like Jasmine (and I suppose any other JavaScript code that catches exceptions) tries to access the properties
message
andstack
.In Nashorn this wasn't a problem, because I could wrap a host exception (I'm in control of nearly all calls from JavaScript) in a custom exception with a
getStack
method, andgetMessage
is of course already there. Due to Nashorn's bean-property-access convention, this worked well.How should I make Graal host exceptions JavaScript compatible?
The text was updated successfully, but these errors were encountered: