Method
JavaScriptCoreContextpush_exception_handler
Declaration [src]
void
jsc_context_push_exception_handler (
JSCContext* context,
JSCExceptionHandler handler,
gpointer user_data,
GDestroyNotify destroy_notify
)
Description [src]
Push an exception handler in context
. Whenever a JavaScript exception happens in
the JSCContext
, the given handler
will be called. The default JSCExceptionHandler
simply calls jsc_context_throw_exception()
to throw the exception to the JSCContext
.
If you don’t want to catch the exception, but only get notified about it, call
jsc_context_throw_exception()
in handler
like the default one does.
The last exception handler pushed is the only one used by the JSCContext
, use
jsc_context_pop_exception_handler()
to remove it and set the previous one. When handler
is removed from the context, destroy_notify
i called with user_data
as parameter.
Parameters
handler
-
Type:
JSCExceptionHandler
A
JSCExceptionHandler
. user_data
-
Type:
gpointer
User data to pass to
handler
.The argument can be NULL
.The data is owned by the caller of the function. destroy_notify
-
Type:
GDestroyNotify
Destroy notifier for
user_data
.The argument can be NULL
.