How do I obtain the pending script exception? #695
Replies: 1 comment
-
|
Hi @AnsisMalins,
Unfortunately, we don't have a simple answer for you. Depending on the context, that exception message could be misleading. V8's C++ API uses maybe types for nearly all returned data. If a V8 API call returns an empty result, it could be for a number of reasons, including that the call failed due to a pending script exception. There's no way to determine the exact cause. If a script exception is thrown, ClearScript eventually catches it and converts it to a managed exception with a better error message. But if a V8 API call returns an empty result while no script is executing, it could be due to a number of less predictable conditions – out-of-memory, internal error, etc. One situation in which we've seen this happen is as follows:
That nested attempt to engage the script engine could result in the exception you're seeing – a script exception is pending, but ClearScript hasn't had a chance to handle it yet. If you have a reproducible case, please let us know. Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I get an exception "The V8 runtime cannot perform the requested operation because a script exception is pending". So what is the script exception? Where is it? How do I obtain it? Where in ClearScript or V8 do I set a breakpoint to see that exception being "pended"?
Beta Was this translation helpful? Give feedback.
All reactions