Skip to content

Commit

Permalink
!fixup cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dmkozh committed Jul 13, 2023
1 parent 5b07bde commit 101bbeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions soroban-env-host/src/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2348,14 +2348,14 @@ impl VmCallerEnv for Host {
&[func.to_val(), args.to_val()],
)
})?;
// Only allow to gracefully handle the recoverable errors.
// Only allow to gracefully handle the recoverable errors.
// Non-recoverable errors should still cause guest to panic and
// abort execution.
if e.is_recoverable() {
Ok(e.error.to_val())
} else {
Err(e)
}
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions soroban-env-host/src/host/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ impl HostError {
/// We consider errors that occur due to broken execution preconditions (
/// such as incorrect footprint) non-recoverable.
pub fn is_recoverable(&self) -> bool {
// All internal errors that originate from the host can be considered
// non-recoverable (they should only appear if there is some bug in the
// All internal errors that originate from the host can be considered
// non-recoverable (they should only appear if there is some bug in the
// host implementation or setup).
if !self.error.is_type(ScErrorType::Contract)
&& !self.error.is_type(ScErrorType::WasmVm)
Expand Down

0 comments on commit 101bbeb

Please sign in to comment.