0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-03 01:09:05 +02:00

modules/vm: Fix format of propagated errors.

This commit is contained in:
Jason Volk 2018-12-30 16:10:28 -08:00
parent 56474586a1
commit aa7333bd00

View file

@ -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