diff --git a/website/api/defines.html b/website/api/defines.html index 8389d159..96f6720e 100644 --- a/website/api/defines.html +++ b/website/api/defines.html @@ -87,17 +87,7 @@ typedef struct duk_number_list_entry duk_number_list_entry;
-/* Internal error codes */ #define DUK_ERR_NONE 0 /* no error (e.g. from duk_get_error_code()) */ -#define DUK_ERR_UNIMPLEMENTED_ERROR 50 /* UnimplementedError */ -#define DUK_ERR_UNSUPPORTED_ERROR 51 /* UnsupportedError */ -#define DUK_ERR_INTERNAL_ERROR 52 /* InternalError */ -#define DUK_ERR_ALLOC_ERROR 53 /* AllocError */ -#define DUK_ERR_ASSERTION_ERROR 54 /* AssertionError */ -#define DUK_ERR_API_ERROR 55 /* APIError */ -#define DUK_ERR_UNCAUGHT_ERROR 56 /* UncaughtError */ - -/* Ecmascript E5 specification error codes */ #define DUK_ERR_ERROR 100 /* Error */ #define DUK_ERR_EVAL_ERROR 101 /* EvalError */ #define DUK_ERR_RANGE_ERROR 102 /* RangeError */ @@ -110,13 +100,6 @@ typedef struct duk_number_list_entry duk_number_list_entry;Return codes from Duktape/C functions
/* Return codes for C functions */ -#define DUK_RET_UNIMPLEMENTED_ERROR (-DUK_ERR_UNIMPLEMENTED_ERROR) -#define DUK_RET_UNSUPPORTED_ERROR (-DUK_ERR_UNSUPPORTED_ERROR) -#define DUK_RET_INTERNAL_ERROR (-DUK_ERR_INTERNAL_ERROR) -#define DUK_RET_ALLOC_ERROR (-DUK_ERR_ALLOC_ERROR) -#define DUK_RET_ASSERTION_ERROR (-DUK_ERR_ASSERTION_ERROR) -#define DUK_RET_API_ERROR (-DUK_ERR_API_ERROR) -#define DUK_RET_UNCAUGHT_ERROR (-DUK_ERR_UNCAUGHT_ERROR) #define DUK_RET_ERROR (-DUK_ERR_ERROR) #define DUK_RET_EVAL_ERROR (-DUK_ERR_EVAL_ERROR) #define DUK_RET_RANGE_ERROR (-DUK_ERR_RANGE_ERROR) diff --git a/website/api/duk_get_error_code.yaml b/website/api/duk_get_error_code.yaml index 05b0af9c..e134bad5 100644 --- a/website/api/duk_get_error_code.yaml +++ b/website/api/duk_get_error_code.yaml @@ -11,8 +11,11 @@ summary: | based on whichError
subclass the value inherits from. For example, if the value at the stack top is an user-defined error which inherits fromReferenceError
, the return value will beDUK_ERR_REFERENCE_ERROR
. - If the value is not an object, does not inherit fromError
, oridx
- is invalid, returns 0 (=DUK_ERR_NONE
). + If the value inherits fromError
but doesn't inherit from any of + the standard subclasses (EvalError, RangeError, ReferenceError, SyntaxError, + TypeError, URIError)DUK_ERR_ERROR
is returned. + If the value is not an object, does not inherit fromError
, or +idx
is invalid, returns 0 (=DUK_ERR_NONE
). example: | if (duk_get_error_code(ctx, -3) == DUK_ERR_URI_ERROR) {