Skip to content
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

Arbitrary exception inside of a @async is not thrown or wrapped into an tink.core.Error #43

Open
nodiex-cloud opened this issue Oct 4, 2020 · 0 comments

Comments

@nodiex-cloud
Copy link

nodiex-cloud commented Oct 4, 2020

If there is null pointer exception in:

@async function myFunc() {
    var v:Dynamic=null;
    v.helloWorld();
}
try {
    @await myFunc();
} catch(e:Dynamic) {
    trace(e);
}

Nothing is caught or thrown by @await myFunc(). This is contrary to my understanding of the following from the documentation:
Any exception results in a Failure, which will pass through all methods until caught

In addition, haxe complains with Catch class parameter must be Dynamic, if you do catch(e:tink.core.Error). It isn't clear if this would help in catching some, I doubt it. It seems like something is eating the exception. Manually executing the myFunc() with myFunc().handle doesn't see any exceptions either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant