7#define DUK__ERRFMT_BUFSIZE 256
9#if defined(DUK_USE_VERBOSE_ERRORS)
16 msg[
sizeof(msg) - 1] = (
char) 0;
37#if defined(DUK_USE_VERBOSE_ERRORS)
38#if defined(DUK_USE_PARANOID_ERRORS)
61#if !defined(DUK_USE_BYTECODE_DUMP_SUPPORT)
111#if defined(DUK_USE_FILE_IO)
117 DUK_D(
DUK_DPRINT(
"default fatal handler called, code %ld -> calling DUK_PANIC()", (
long) code));
126#if !defined(DUK_USE_PANIC_HANDLER)
128#if defined(DUK_USE_FILE_IO)
132#elif defined(DUK_USE_PANIC_EXIT)
134#elif defined(DUK_USE_PANIC_SEGFAULT)
135 "segfaulting on purpose"
137#
error no DUK_USE_PANIC_xxx macro defined
139 ")\n", (
long) code, (
const char *) (msg ? msg :
"null"));
147#if defined(DUK_USE_PANIC_ABORT)
149#elif defined(DUK_USE_PANIC_EXIT)
151#elif defined(DUK_USE_PANIC_SEGFAULT)
156#error no DUK_USE_PANIC_xxx macro defined
163#undef DUK__ERRFMT_BUFSIZE
#define DUK_UNREACHABLE()
#define DUK_CAUSE_SEGFAULT()
duk_int_fast32_t duk_int_t
duk_uint_fast32_t duk_uint_t
#define DUK_USE_PANIC_ABORT
DUK_INTERNAL_DECL const char * duk_push_string_readable(duk_context *ctx, duk_idx_t index)
#define DUK_ERROR_RAW_FMT1(thr, file, line, err, fmt, arg1)
#define DUK_STR_INTERNAL_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)
#define DUK_PANIC(code, msg)
#define DUK_STR_UNSUPPORTED
#define DUK_ERROR_RAW_FMT3(thr, file, line, err, fmt, arg1, arg2, arg3)
#define DUK_STR_UNIMPLEMENTED
#define DUK_ERROR_RAW(thr, file, line, err, msg)
#define DUK_ERR_TYPE_ERROR
#define DUK_ERR_ALLOC_ERROR
#define DUK_ERR_INTERNAL_ERROR
#define DUK_ERR_API_ERROR
#define DUK_ERR_SYNTAX_ERROR
#define DUK_ERR_RANGE_ERROR
#define DUK_ERR_UNIMPLEMENTED_ERROR
#define DUK_ERR_UNSUPPORTED_ERROR
#define DUK__ERRFMT_BUFSIZE
DUK_INTERNAL void duk_err_require_type_index(duk_hthread *thr, const char *filename, duk_int_t linenumber, duk_idx_t index, const char *expect_name)
DUK_INTERNAL void duk_err_api(duk_hthread *thr, const char *filename, duk_int_t linenumber, const char *message)
DUK_INTERNAL void duk_err_range(duk_hthread *thr, const char *filename, duk_int_t linenumber, const char *message)
DUK_INTERNAL void duk_err_handle_error_fmt(duk_hthread *thr, const char *filename, duk_uint_t line_and_code, const char *fmt,...)
DUK_INTERNAL void duk_default_panic_handler(duk_errcode_t code, const char *msg)
DUK_INTERNAL void duk_default_fatal_handler(duk_context *ctx, duk_errcode_t code, const char *msg)
DUK_INTERNAL void duk_err_api_index(duk_hthread *thr, const char *filename, duk_int_t linenumber, duk_idx_t index)
DUK_INTERNAL void duk_err_internal_defmsg(duk_hthread *thr, const char *filename, duk_int_t linenumber)
DUK_INTERNAL void duk_err_alloc(duk_hthread *thr, const char *filename, duk_int_t linenumber, const char *message)
DUK_INTERNAL void duk_err_unimplemented_defmsg(duk_hthread *thr, const char *filename, duk_int_t linenumber)
DUK_INTERNAL void duk_err_internal(duk_hthread *thr, const char *filename, duk_int_t linenumber, const char *message)
DUK_INTERNAL void duk_err_handle_error(duk_hthread *thr, const char *filename, duk_uint_t line_and_code, const char *msg)
static void error(LoadState *S, const char *why)