Skip to content

Commit cef180f

Browse files
alexeytfacebook-github-bot
authored andcommitted
Publish PREG_JIT_STACKLIMIT_ERROR in hhi and use it in the HSL
Reviewed By: DavidSnider Differential Revision: D39677047 fbshipit-source-id: bf89d8c32b24e41c0682e9976dd94e10eb92ba1c
1 parent 3e69497 commit cef180f

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

hphp/hack/hhi/stdlib/builtins_preg.hhi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ const int PREG_RECURSION_LIMIT_ERROR = 0;
160160
const int PREG_BAD_UTF8_ERROR = 0;
161161
const int PREG_BAD_UTF8_OFFSET_ERROR = 0;
162162
const int PREG_BAD_REGEX_ERROR = 0;
163+
const int PREG_JIT_STACKLIMIT_ERROR = 0;
163164

164165
const int PREG_GREP_INVERT = 0;
165166
const string PCRE_VERSION = '';

hphp/hsl/src/regex/exception.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public function __construct(Pattern<Match> $pattern, int $code)[] {
2121
\PREG_BAD_UTF8_ERROR => 'Bad UTF8 error',
2222
\PREG_BAD_UTF8_OFFSET_ERROR => 'Bad UTF8 offset error',
2323
\PREG_BAD_REGEX_ERROR => 'Regex failed to compile',
24+
\PREG_JIT_STACKLIMIT_ERROR => 'PCRE JIT stack limit error',
2425
];
2526
parent::__construct(
2627
Str\format(

0 commit comments

Comments
 (0)