mirror of https://github.com/svaarala/duktape.git
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.
24 lines
374 B
24 lines
374 B
=proto
|
|
void duk_throw(duk_context *ctx);
|
|
|
|
=stack
|
|
[ ... val! ]
|
|
|
|
=summary
|
|
<p>Throw the value on top of the stack. This call never returns.</p>
|
|
|
|
=example
|
|
/* Throw a string value; equivalent to the Ecmascript code:
|
|
*
|
|
* throw "this string is thrown";
|
|
*/
|
|
|
|
duk_push_string(ctx, "this string is thrown");
|
|
duk_throw(ctx);
|
|
|
|
=tags
|
|
error
|
|
|
|
=seealso
|
|
duk_error
|
|
duk_push_error_object
|
|
|