aboutsummaryrefslogtreecommitdiffstats
path: root/util/serialization.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-10-11 22:42:17 +0200
committerKim Alvefur <zash@zash.se>2018-10-11 22:42:17 +0200
commitb7fd262a4c458336e99ed1942bfe190aa02b932c (patch)
treee333c48dc1a8a6977683942e033940f3f7066e66 /util/serialization.lua
parentd076a3e6c77d38a7b0b4fab9e6c8986a2745a78c (diff)
downloadprosody-b7fd262a4c458336e99ed1942bfe190aa02b932c.tar.gz
prosody-b7fd262a4c458336e99ed1942bfe190aa02b932c.zip
util.serialization: Make errors fatal by default (like the previous implementation)
Diffstat (limited to 'util/serialization.lua')
-rw-r--r--util/serialization.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/serialization.lua b/util/serialization.lua
index 5a8eef81..628c9d33 100644
--- a/util/serialization.lua
+++ b/util/serialization.lua
@@ -103,7 +103,7 @@ local function new(opt)
opt.equals = opt.equals or "=";
end
- local fallback = opt.fatal and fatal_error or opt.fallback or default_fallback;
+ local fallback = opt.fallback or opt.fatal == false and default_fallback or fatal_error;
local function ser(v)
return (types[type(v)] or fallback)(v);