Software /
code /
prosody
Diff
util/serialization.lua @ 9480:006a71a83e6a
util.serialization: Make errors fatal by default (like the previous implementation)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 11 Oct 2018 22:42:17 +0200 |
parent | 9341:009dad867e52 |
child | 9483:903e0cfd4cc9 |
line wrap: on
line diff
--- a/util/serialization.lua Thu Oct 11 18:20:09 2018 +0100 +++ b/util/serialization.lua Thu Oct 11 22:42:17 2018 +0200 @@ -103,7 +103,7 @@ 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);