print log on erorrs (#68)

This commit is contained in:
vms 2021-02-18 16:48:34 +03:00 committed by GitHub
parent e5244db6a1
commit d43b5454fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,8 @@ fn set_last_error<'i>(
e: Rc<ExecutionError>,
tetraplet: Option<SecurityTetraplet>,
) {
log::warn!("call failed with an error: {}", e);
let instruction = format!("{}", call);
let last_error = LastErrorDescriptor::new(e, instruction, tetraplet);
exec_ctx.last_error = Some(last_error);

View File

@ -31,6 +31,7 @@ impl<'i> super::ExecutableInstruction<'i> for Xor<'i> {
Err(e) if is_catchable_by_xor(&e) => {
exec_ctx.subtree_complete = true;
exec_ctx.last_error_could_be_set = true;
log::warn!("xor caught an error: {}", e);
self.1.execute(exec_ctx, trace_ctx)
}