mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
modules/vm: Fix format of propagated errors.
This commit is contained in:
parent
56474586a1
commit
aa7333bd00
1 changed files with 6 additions and 4 deletions
|
@ -501,11 +501,12 @@ catch(const error &e) // VM FAULT CODE
|
|||
return handle_error
|
||||
(
|
||||
*eval.opts, e.code,
|
||||
"eval %s %s: %s %s",
|
||||
"eval %s %s: %s %s :%s",
|
||||
json::get<"event_id"_>(event)?: json::string{"<edu>"},
|
||||
reflect(e.code),
|
||||
e.what(),
|
||||
e.content
|
||||
unquote(json::object(e.content).get("errcode")),
|
||||
unquote(json::object(e.content).get("error"))
|
||||
);
|
||||
}
|
||||
catch(const m::error &e) // GENERAL MATRIX ERROR
|
||||
|
@ -513,10 +514,11 @@ catch(const m::error &e) // GENERAL MATRIX ERROR
|
|||
return handle_error
|
||||
(
|
||||
*eval.opts, fault::GENERAL,
|
||||
"eval %s #GP (General Protection): %s %s",
|
||||
"eval %s #GP (General Protection): %s %s :%s",
|
||||
json::get<"event_id"_>(event)?: json::string{"<edu>"},
|
||||
e.what(),
|
||||
e.content
|
||||
unquote(json::object(e.content).get("errcode")),
|
||||
unquote(json::object(e.content).get("error"))
|
||||
);
|
||||
}
|
||||
catch(const ctx::interrupted &e) // INTERRUPTION
|
||||
|
|
Loading…
Reference in a new issue