Skip to content

Commit 877e52d

Browse files
authored
Merge pull request #349 from aergoio/release/2.5.1-dev1
Release/2.5.1
2 parents db13a0d + a11e3ad commit 877e52d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

contract/vm_callback.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,12 @@ func luaDelegateCallContract(L *LState, service C.int, contractId *C.char,
399399
if ctx.traceFile != nil {
400400
_, _ = ctx.traceFile.WriteString(fmt.Sprintf("recovery snapshot: %d\n", seq))
401401
}
402-
return -1, C.CString("[Contract.LuaDelegateCallContract] call error: " + ce.err.Error())
402+
switch ceErr := ce.err.(type) {
403+
case *VmTimeoutError:
404+
return -1, C.CString(ceErr.Error())
405+
default:
406+
return -1, C.CString("[Contract.LuaDelegateCallContract] call error: " + ce.err.Error())
407+
}
403408
}
404409

405410
if seq == 1 {

0 commit comments

Comments
 (0)