]>
git.proxmox.com Git - ceph.git/blob - ceph/src/civetweb/src/third_party/duktape-1.3.0/src-separate/duk_error_longjmp.c
2 * Do a longjmp call, calling the fatal error handler if no
6 #include "duk_internal.h"
8 DUK_INTERNAL
void duk_err_longjmp(duk_hthread
*thr
) {
9 DUK_ASSERT(thr
!= NULL
);
11 if (!thr
->heap
->lj
.jmpbuf_ptr
) {
13 * If we don't have a jmpbuf_ptr, there is little we can do
14 * except panic. The caller's expectation is that we never
18 DUK_D(DUK_DPRINT("uncaught error: type=%d iserror=%d value1=%!T value2=%!T",
19 (int) thr
->heap
->lj
.type
, (int) thr
->heap
->lj
.iserror
,
20 &thr
->heap
->lj
.value1
, &thr
->heap
->lj
.value2
));
22 duk_fatal((duk_context
*) thr
, DUK_ERR_UNCAUGHT_ERROR
, "uncaught error");
26 DUK_LONGJMP(thr
->heap
->lj
.jmpbuf_ptr
->jb
);