23#ifdef DUK_USE_VERBOSE_ERRORS
31#ifdef DUK_USE_VERBOSE_ERRORS
32 DUK_DD(
DUK_DDPRINT(
"duk_err_create_and_throw(): code=%ld, msg=%s, filename=%s, line=%ld",
33 (
long) code, (
const char *) msg,
34 (
const char *) filename, (
long) line));
74 DUK_D(
DUK_DPRINT(
"double fault detected -> push built-in fixed 'double error' instance"));
77 DUK_D(
DUK_DPRINT(
"double fault detected; there is no built-in fixed 'double error' instance "
78 "-> push the error code as a number"));
87#ifdef DUK_USE_VERBOSE_ERRORS
108 DUK_D(
DUK_DPRINT(
"alloc or double error: skip throw augmenting to avoid further trouble"));
110#if defined(DUK_USE_AUGMENT_ERROR_THROW)
167 default: msg =
"unknown";
break;
179 duk_error_raw(ctx, code,
NULL, 0,
"%s error (rc %ld)", (
const char *) msg, (
long) rc);
#define DUK_UNREACHABLE()
duk_small_int_t duk_ret_t
duk_int_fast32_t duk_int_t
duk_small_int_t duk_bool_t
#define DUK_LJ_TYPE_THROW
DUK_INTERNAL_DECL void duk_err_setup_heap_ljstate(duk_hthread *thr, duk_small_int_t lj_type)
DUK_INTERNAL void duk_err_longjmp(duk_hthread *thr)
#define DUK_BIDX_DOUBLE_ERROR
DUK_EXTERNAL void duk_require_stack(duk_context *ctx, duk_idx_t extra)
DUK_EXTERNAL void duk_push_int(duk_context *ctx, duk_int_t val)
DUK_INTERNAL_DECL void duk_push_hobject_bidx(duk_context *ctx, duk_small_int_t builtin_idx)
DUK_INTERNAL_DECL void duk_hthread_sync_and_null_currpc(duk_hthread *thr)
DUK_INTERNAL_DECL void duk_err_augment_error_throw(duk_hthread *thr)
#define DUK_CALLSTACK_DEFAULT_MAX
DUK_EXTERNAL void duk_error_raw(duk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt,...)
#define DUK_CALLSTACK_GROW_STEP
#define DUK_ERRCODE_FLAG_NOBLAME_FILELINE
DUK_EXTERNAL duk_idx_t duk_push_error_object_raw(duk_context *ctx, duk_errcode_t err_code, const char *filename, duk_int_t line, const char *fmt,...)
DUK_INTERNAL_DECL duk_tval * duk_get_tval(duk_context *ctx, duk_idx_t index)
#define DUK_RET_UNCAUGHT_ERROR
#define DUK_RET_ALLOC_ERROR
#define DUK_RET_TYPE_ERROR
#define DUK_ERR_ALLOC_ERROR
#define DUK_RET_RANGE_ERROR
#define DUK_RET_EVAL_ERROR
#define DUK_RET_REFERENCE_ERROR
#define DUK_RET_SYNTAX_ERROR
#define DUK_RET_UNIMPLEMENTED_ERROR
#define DUK_RET_API_ERROR
#define DUK_RET_INTERNAL_ERROR
#define DUK_RET_ASSERTION_ERROR
#define DUK_RET_URI_ERROR
#define DUK_RET_UNSUPPORTED_ERROR
DUK_INTERNAL void duk_err_create_and_throw(duk_hthread *thr, duk_errcode_t code, const char *msg, const char *filename, duk_int_t line)
DUK_INTERNAL void duk_error_throw_from_negative_rc(duk_hthread *thr, duk_ret_t rc)
duk_bool_t handling_error
duk_hobject * builtins[DUK_NUM_BUILTINS]