Function chakracore_sys::JsGetAndClearExceptionWithMetadata [] [src]

pub unsafe extern "system" fn JsGetAndClearExceptionWithMetadata(
    metadata: *mut JsValueRef
) -> JsErrorCode

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. 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. The exception metadata for the runtime of the current context. The code JsNoError if the operation succeeded, a failure code otherwise.