Why isn't this error caught?
Basic code example:
The output when you run this is the following:
So the code within the
catch
statement isn't running, but the code after the catch statement is executed. And yet the program crashes due to an uncaught error.4 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Interesting, I'll give this a try. Thanks!
You don’t need to handle it like this. You just need to await it within the try catch.
Not awaiting it will let the try catch continue down and out, not catching any errors that the promise may throw.
Basically where the promise is being resolved is where the errors from the promise will be thrown and caught.
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View