You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
659 B

=proto
void duk_fatal(duk_context *ctx, int err_code, const char *err_msg);
=summary
<p>Call fatal error handler with a specified error code and an optional
message (<code>err_msg</code> may be <code>NULL</code>). The valid range
for error codes is [1,16777215].</p>
<p>A fatal error handler never returns and may e.g. exit the current
process. Error catching points (like <code>try-catch</code> statements
and error catching API calls) are bypassed. You should only call
this function when a truly fatal, unrecoverable error has occurred.</p>
=example
duk_fatal(ctx, DUK_ERR_INTERNAL_ERROR, "assumption failed");
=tags
error
=fixme
Useful to expose?