aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/zjs_console.c4
-rw-r--r--src/zjs_error.c1
-rw-r--r--src/zjs_error.h2
3 files changed, 2 insertions, 5 deletions
diff --git a/src/zjs_console.c b/src/zjs_console.c
index 13738d4..339b9e5 100644
--- a/src/zjs_console.c
+++ b/src/zjs_console.c
@@ -239,9 +239,9 @@ static jerry_value_t console_assert(const jerry_value_t function_obj,
if (!b) {
if (argc > 1) {
value2str(argv[1], message, MAX_STR_LENGTH, false);
- return ASSERTION_ERROR(message);
+ return zjs_custom_error("AssertionError", message);
} else {
- return ASSERTION_ERROR("console.assert");
+ return zjs_custom_error("AssertionError", "console.assert");
}
}
return ZJS_UNDEFINED;
diff --git a/src/zjs_error.c b/src/zjs_error.c
index 306d569..831f2ea 100644
--- a/src/zjs_error.c
+++ b/src/zjs_error.c
@@ -9,7 +9,6 @@ typedef struct {
} zjs_error_t;
static zjs_error_t error_types[] = {
- { "AssertionError" },
{ "NetworkError" },
{ "NotSupportedError" },
{ "RangeError" },
diff --git a/src/zjs_error.h b/src/zjs_error.h
index 4b36d41..1a4f66f 100644
--- a/src/zjs_error.h
+++ b/src/zjs_error.h
@@ -6,7 +6,6 @@
#include "jerry-api.h"
typedef enum zjs_error_type {
- AssertionError,
NetworkError,
NotSupportedError,
RangeError,
@@ -46,7 +45,6 @@ jerry_value_t zjs_standard_error(zjs_error_type_t type, const char *message);
#define zjs_error(msg) (zjs_standard_error(Error, (msg)))
-#define ASSERTION_ERROR(msg) (zjs_standard_error(AssertionError, (msg)))
#define SECURITY_ERROR(msg) (zjs_standard_error(SecurityError, (msg)))
#define NOTSUPPORTED_ERROR(msg) (zjs_standard_error(NotSupportedError, (msg)))
#define SYNTAX_ERROR(msg) (zjs_standard_error(SyntaxError, (msg)))