-
Notifications
You must be signed in to change notification settings - Fork 1.2k
JsGetAndClearExceptionWithMetadata
Returns metadata relating to the exception that caused the runtime of the current context to be in the exception state and resets the exception state for that runtime. The metadata includes a reference to the exception itself.
CHAKRA_API
JsGetAndClearExceptionWithMetadata(
_Out_ JsValueRef *metadata);
- metadata: The exception metadata for the runtime of the current context.
The code JsNoError if the operation succeeded, a failure code otherwise.
This API is experimental and may have breaking change later.
If the runtime of the current context is not in an exception state, this API will return JsErrorInvalidArgument. If the runtime is disabled, this will return an exception indicating that the script was terminated, but it will not clear the exception (the exception will be cleared if the runtime is re-enabled using JsEnableRuntimeExecution).
The metadata value is a javascript object with the following properties: exception, the thrown exception object; line, the 0 indexed line number where the exception was thrown; column, the 0 indexed column number where the exception was thrown; length, the source-length of the cause of the exception; source, a string containing the line of source code where the exception was thrown; and url, a string containing the name of the script file containing the code that threw the exception.
Requires an active script context.
- Architecture Overview
- Building ChakraCore
- ChakraCore Code Structure
- Contributor Guidance
- Engineering Notes
- Embedding ChakraCore
- Testing ChakraCore
- Getting ChakraCore binaries
- Label Glossary
- Resources
- Roadmap / Release Notes
Want to contribute to this Wiki? Fork it and send a pull request!