-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Parse Promise Then Handler Doesn't Crash With Error #615
Comments
cc @andrewimm |
This is part of the Promises/A+ spec. Thrown exceptions within the execution of a promise are caught by the promise, and passed to the next If you want to catch the exceptions that have occurred up until a point, just provide an error callback to any |
There is an error callback that just calls response.error(error). But it was never called so the cloud code method never responded. |
Code sample? Keep in mind, if you do someTask().then( onSuccess, onError ) the error handler will catch exceptions from |
Gotcha. Yeah it's code in the onSuccess that's failing silently. |
I tend to tack on a final |
When I experience a javascript error in my promise then handler my requests just hang. No error shows up in the console and the code doesn't return.
In a promise.then() handler just add this line.
notarealvar.notarealthing();
The request just hangs. If you wrap it in a try catch you can see an error.
The text was updated successfully, but these errors were encountered: