Commit 6805515
committed
bugfix: ngx.re: fixed the error stacktrace level when missing PCRE support.
Since we override the `require` function in `resty.base`, the proper
stacktrace level for this error is 3 since it is thrown in the main
chunk of the module.
Example:
Previously, the previous behavior with `resty` was:
$ resty -e 'require "ngx.re"'
ERROR: no support for 'ngx.re' module: OpenResty was compiled without PCRE support
stack traceback:
...
Now, the error contains the chunkame `(command line -e):1:`:
$ resty -e 'require "ngx.re"'
ERROR: (command line -e):1: no support for 'ngx.re' module: OpenResty was compiled without PCRE support
stack traceback:
...
Which is similar to the error reported by other `ngx.re` APIs when
attempting to use them without PCRE support:
$ resty -e 'ngx.re.gmatch()'
ERROR: (command line -e):1: no support for 'ngx.re.gmatch': OpenResty was compiled without PCRE support
stack traceback:
...1 parent 1985bf8 commit 6805515
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
0 commit comments