diff options
author | Kim Alvefur <zash@zash.se> | 2018-10-27 12:56:01 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-10-27 12:56:01 +0200 |
commit | a261de73b9e71b4fc51bfb0afd8fc41148b41801 (patch) | |
tree | b4f91c97b80ff99b022cb79cd9d70c312b6071e4 /util/serialization.lua | |
parent | 14978069896e87083fd46795cc26b2f58b24828f (diff) | |
download | prosody-a261de73b9e71b4fc51bfb0afd8fc41148b41801.tar.gz prosody-a261de73b9e71b4fc51bfb0afd8fc41148b41801.zip |
util.serialization: Encode non-fatal error in way that can be restored
It could previously encode to eg `{ [nil] = ... }` which doesn't get decoded
Diffstat (limited to 'util/serialization.lua')
-rw-r--r-- | util/serialization.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/serialization.lua b/util/serialization.lua index 8ef8048d..dd6a2a2b 100644 --- a/util/serialization.lua +++ b/util/serialization.lua @@ -39,7 +39,7 @@ local function fatal_error(obj, why) end local function nonfatal_fallback(x, why) - return s_format("nil --[[%s: %s]]", type(x), why or "fail"); + return s_format("{__type=%q,__error=%q}", type(x), why or "fail"); end local string_escapes = { |