in src/ExecuteCode.cpp [31:58]
static void exceptionToProto(SEXP _e, ExceptionInfo *proto) {
ShieldSEXP e = _e;
if (Rf_inherits(e, "interrupt")) {
proto->mutable_interrupted();
proto->set_message("Interrupted");
return;
}
try {
proto->set_message(asStringUTF8(RI->conditionMessage(e)));
} catch (RError const&) {
proto->set_message("Error");
}
try {
ShieldSEXP call = RI->conditionCall(e);
if (call != R_NilValue && !(call.type() == LANGSXP && CAR(call) == RI->jetbrainsRunFunction)) {
proto->set_call(getPrintedValue(call));
}
} catch (RError const&) {
}
if (Rf_inherits(e, "packageNotFoundError")) {
std::string package = asStringUTF8(e["package"]);
if (!package.empty()) {
proto->set_packagenotfound(package);
return;
}
}
proto->mutable_simpleerror();
}