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.
 
 
 
 
 
 

28 lines
448 B

name: duk_throw
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
introduced: 1.0.0