Skip to content

Commit 9980264

Browse files
authored
change: standardize the error msg & fix stack level (openresty#385)
1 parent da68b21 commit 9980264

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ngx/ssl/clienthello.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function _M.get_client_hello_server_name()
8080
end
8181

8282
if ngx_phase() ~= "ssl_client_hello" then
83-
error("API disabled in the current context", 2)
83+
error("API disabled in the current context")
8484
end
8585

8686
local sizep = get_size_ptr()
@@ -108,7 +108,7 @@ function _M.get_client_hello_ext(ext_type)
108108
end
109109

110110
if ngx_phase() ~= "ssl_client_hello" then
111-
error("API disabled in the current context", 2)
111+
error("API disabled in the current context")
112112
end
113113

114114
local sizep = get_size_ptr()
@@ -146,7 +146,7 @@ function _M.set_protocols(protocols)
146146
end
147147

148148
if ngx_phase() ~= "ssl_client_hello" then
149-
error("API disabled in the current context" .. ngx_phase(), 2)
149+
error("API disabled in the current context")
150150
end
151151

152152
local prots = 0

0 commit comments

Comments
 (0)