disruption
This commit is contained in:
@@ -570,20 +570,23 @@ JS_BOOL JS_StrictEq (JSContext *ctx, JSValue op1, JSValue op2);
|
||||
7. Error Handling
|
||||
============================================================ */
|
||||
|
||||
JSValue JS_Throw (JSContext *ctx, JSValue obj);
|
||||
JSValue JS_GetException (JSContext *ctx);
|
||||
JS_BOOL JS_HasException (JSContext *ctx);
|
||||
|
||||
/* Set the disruption flag. No logging. */
|
||||
JSValue JS_Disrupt (JSContext *ctx);
|
||||
|
||||
/* Log a message to a named channel. Routes through the ƿit log callback
|
||||
if one has been set, otherwise falls back to fprintf(stderr). */
|
||||
void __js_printf_like (3, 4)
|
||||
JS_Log (JSContext *ctx, const char *channel, const char *fmt, ...);
|
||||
|
||||
/* Log to "error" channel + raise disruption. The common case. */
|
||||
JSValue __js_printf_like (2, 3)
|
||||
JS_ThrowSyntaxError (JSContext *ctx, const char *fmt, ...);
|
||||
JSValue __js_printf_like (2, 3)
|
||||
JS_ThrowTypeError (JSContext *ctx, const char *fmt, ...);
|
||||
JSValue __js_printf_like (2, 3)
|
||||
JS_ThrowReferenceError (JSContext *ctx, const char *fmt, ...);
|
||||
JSValue __js_printf_like (2, 3)
|
||||
JS_ThrowRangeError (JSContext *ctx, const char *fmt, ...);
|
||||
JSValue __js_printf_like (2, 3)
|
||||
JS_ThrowInternalError (JSContext *ctx, const char *fmt, ...);
|
||||
JSValue JS_ThrowOutOfMemory (JSContext *ctx);
|
||||
JS_RaiseDisrupt (JSContext *ctx, const char *fmt, ...);
|
||||
|
||||
/* Log to "memory" channel + disrupt. Skips JS callback (can't allocate). */
|
||||
JSValue JS_RaiseOOM (JSContext *ctx);
|
||||
|
||||
/* ============================================================
|
||||
8. Function Creation and Invocation
|
||||
|
||||
Reference in New Issue
Block a user