Browse Source

reword regexp recursion limit error messages to match js compiler's

pull/1/head
Sami Vaarala 12 years ago
parent
commit
3e69cffbe0
  1. 2
      src/duk_regexp_compiler.c
  2. 2
      src/duk_regexp_executor.c

2
src/duk_regexp_compiler.c

@ -235,7 +235,7 @@ static duk_i32 parse_disjunction(duk_re_compiler_ctx *re_ctx, int expect_eof) {
if (re_ctx->recursion >= re_ctx->recursion_limit) {
DUK_ERROR(re_ctx->thr, DUK_ERR_INTERNAL_ERROR,
"regexp compilation recursion limit reached");
"regexp compiler recursion limit reached");
}
re_ctx->recursion++;

2
src/duk_regexp_executor.c

@ -134,7 +134,7 @@ static int inp_getprev(duk_re_matcher_ctx *re_ctx, duk_u8 *sp) {
static duk_u8 *match_regexp(duk_re_matcher_ctx *re_ctx, duk_u8 *pc, duk_u8 *sp) {
if (re_ctx->recursion >= re_ctx->recursion_limit) {
DUK_ERROR(re_ctx->thr, DUK_ERR_INTERNAL_ERROR, "regexp recursion limit reached");
DUK_ERROR(re_ctx->thr, DUK_ERR_INTERNAL_ERROR, "regexp executor recursion limit reached");
}
re_ctx->recursion++;

Loading…
Cancel
Save