/// <summary>
/// Sets the runtime of the current context to an exception state.
/// </summary>
/// <remarks>
/// <para>
/// If the runtime of the current context is already in an exception state, this API will
/// throw <c>JsErrorInExceptionState</c>.
/// </para>
/// <para>
/// Requires an active script context.
/// </para>
/// </remarks>
/// <param name="exception">
/// The JavaScript exception to set for the runtime of the current context.
/// </param>
public static void SetException(JavaScriptValue exception)
{
Native.ThrowIfError(Native.JsSetException(exception));
}