mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 05:37:39 +03:00
util.error: Pass through existing error objects passed to new()
This commit is contained in:
parent
7672305919
commit
58e33e3995
1 changed files with 1 additions and 0 deletions
|
@ -35,6 +35,7 @@ end
|
|||
-- What to set `type` to for stream errors or SASL errors? Those don't have a 'type' attr.
|
||||
|
||||
local function new(e, context, registry, source)
|
||||
if is_err(e) then return e; end
|
||||
local template = registry and registry[e];
|
||||
if not template then
|
||||
if type(e) == "table" then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue