diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-10-15 13:43:03 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-10-15 13:43:03 +0100 |
commit | 58e33e399553ccc457de266c36102308f63bfe02 (patch) | |
tree | d1485817f74c418b483df72cad43a56685d88c0b | |
parent | 7672305919887537f04441deaf51e68def696f79 (diff) | |
download | prosody-58e33e399553ccc457de266c36102308f63bfe02.tar.gz prosody-58e33e399553ccc457de266c36102308f63bfe02.zip |
util.error: Pass through existing error objects passed to new()
-rw-r--r-- | util/error.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util/error.lua b/util/error.lua index 132389f7..85265e47 100644 --- a/util/error.lua +++ b/util/error.lua @@ -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 |