Skip to content

Commit 4be6773

Browse files
committed
Add missing DUK_DCERROR_UNSUPPORTED() macro
1 parent 3f73234 commit 4be6773

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src-input/duk_error.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@
181181
#define DUK_ERROR_UNSUPPORTED(thr) do { \
182182
DUK_ERROR((thr), DUK_ERR_ERROR, DUK_STR_UNSUPPORTED); \
183183
} while (0)
184+
#define DUK_DCERROR_UNSUPPORTED(thr) do { \
185+
DUK_ERROR_UNSUPPORTED((thr)); \
186+
return 0; \
187+
} while (0)
184188
#define DUK_ERROR_ERROR(thr,msg) do { \
185189
duk_err_error((thr), DUK_FILE_MACRO, (duk_int_t) DUK_LINE_MACRO, (msg)); \
186190
} while (0)
@@ -269,6 +273,10 @@
269273
#define DUK_ERROR_UNSUPPORTED(thr) do { \
270274
duk_err_error((thr)); \
271275
} while (0)
276+
#define DUK_DCERROR_UNSUPPORTED(thr) do { \
277+
DUK_UNREF((thr)); \
278+
return DUK_RET_ERROR; \
279+
} while (0)
272280
#define DUK_ERROR_ERROR(thr,msg) do { \
273281
duk_err_error((thr)); \
274282
} while (0)

0 commit comments

Comments
 (0)