Skip to content

Commit 6fc4b7b

Browse files
committed
let ckb_vm::Error::External("stopped") return ErrorKind::Internal instead of ErrorKind::Script
1 parent 6ed0976 commit 6fc4b7b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

script/src/error.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,12 @@ impl ScriptError {
182182

183183
impl From<TransactionScriptError> for Error {
184184
fn from(error: TransactionScriptError) -> Self {
185-
ErrorKind::Script.because(error)
185+
match error.cause {
186+
ScriptError::Other(ref reason) if reason == "stopped" => {
187+
ErrorKind::Internal.because(error)
188+
}
189+
_ => ErrorKind::Script.because(error),
190+
}
186191
}
187192
}
188193

0 commit comments

Comments
 (0)