diff --git a/zomp/lib/otpr/zx/0.13.2/src/zx.erl b/zomp/lib/otpr/zx/0.13.2/src/zx.erl index 2ef17cf..caa85b5 100644 --- a/zomp/lib/otpr/zx/0.13.2/src/zx.erl +++ b/zomp/lib/otpr/zx/0.13.2/src/zx.erl @@ -325,13 +325,21 @@ done({error, Code}) when is_integer(Code) -> init:stop(Code); done({error, Reason}) -> ok = zx_daemon:idle(), - Message = "Operation failed with: ~160tp", - ok = tell(error, Message, [Reason]), + {Message, Subs} = + case unicode:characters_to_list(Reason) of + {_, _, _} -> {"Operation failed with: ~160tp", Reason}; + String -> {"Operation failed with: ~ts", String} + end, + ok = tell(error, Message, [Subs]), init:stop(1); -done({error, Info, Code}) -> +done({error, Reason, Code}) -> ok = zx_daemon:idle(), - Message = "Operation failed with: ~160tp", - ok = tell(error, Message, [Info]), + {Message, Subs} = + case unicode:characters_to_list(Reason) of + {_, _, _} -> {"Operation failed with: ~160tp", Reason}; + String -> {"Operation failed with: ~ts", String} + end, + ok = tell(error, Message, [Subs]), init:stop(Code); done({error, Class, Error, Stacktrace}) -> ok = zx_daemon:idle(),