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.
17 lines
284 B
17 lines
284 B
/*===
|
|
rc=1 -> throw me
|
|
===*/
|
|
|
|
int test_1(duk_context *ctx) {
|
|
duk_push_string(ctx, "throw me");
|
|
duk_throw(ctx);
|
|
return 0;
|
|
}
|
|
|
|
void test(duk_context *ctx) {
|
|
int rc;
|
|
|
|
rc = duk_safe_call(ctx, test_1, 0, 1, DUK_INVALID_INDEX);
|
|
printf("rc=%d -> %s\n", rc, duk_get_string(ctx, -1));
|
|
}
|
|
|
|
|