Skip to content

Exception support #757

Closed
Closed
@dcharkes

Description

@dcharkes

It would be nice that if a Java exception is throw, it is wrapped in a JavaException in Dart and that Dart exception is throw.

JavaException should contain as much information as possible.

JavaException should not refer to any Java object, but copy all information to Dart memory. (The error message, the Java stack trace, etc.) Exceptions should not be common, so we should not worry about the overhead of copying, and it would be good to not have to worry about native resource management at all.

JavaException should have a toString() that prints the Java error message and stack trace. This will ensure that if we don't catch it we can get some useful information from stderr/stdout.

Related issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang-javaRelated to Java support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions