eclipsesource / eclipsesource/J2V8

Enhance JVM exception translation to V8

Open
#525 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.6k
Forks
387
PR merge metrics
No merged PRs in 30d

Description

Following the conversation on #296, I'm opening this issue to suggest a better way to throw JVM exceptions within V8.

As per @irbull, the [current approach](https://github.com/eclipsesource/J2V8/blob/master/jni/com_eclipsesource_v8_V8Impl.cpp#L1679) is to grab the `Throwable` message and throw the string itself. However, there is an [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) specification that we should follow. Building an `Error` object will enable handlers to access the relevant information (name, message, stacktrace).

P.S. I would love to contribute this, but my C++ is a little rusty. If anyone would be willing to help, that'd be great.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.