Skip to content

Commit

Permalink
let ckb_vm::Error::External("stopped") return ErrorKind::Internal ins…
Browse files Browse the repository at this point in the history
…tead of ErrorKind::Script
  • Loading branch information
eval-exec committed Oct 29, 2024
1 parent 8cb49e4 commit 76b0438
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion script/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,12 @@ impl ScriptError {

impl From<TransactionScriptError> for Error {
fn from(error: TransactionScriptError) -> Self {
ErrorKind::Script.because(error)
match error.cause {
ScriptError::Other(ref reason) if reason == "stopped" => {
ErrorKind::Internal.because(error)
}
_ => ErrorKind::Script.because(error),
}
}
}

Expand Down

0 comments on commit 76b0438

Please sign in to comment.