Go bindings: reword error description for unknown cases

This commit is contained in:
Alex Beregszaszi 2018-08-20 15:53:26 +01:00
parent eb447e9ecc
commit a65e9fdf77
1 changed files with 2 additions and 4 deletions

View File

@ -116,17 +116,15 @@ func (err Error) Error() string {
return "evmc: the WebAssembly unreachable instruction has been hit during execution" return "evmc: the WebAssembly unreachable instruction has been hit during execution"
case C.EVMC_WASM_TRAP: case C.EVMC_WASM_TRAP:
return "evmc: a WebAssembly trap has been hit during execution" return "evmc: a WebAssembly trap has been hit during execution"
case C.EVMC_INTERNAL_ERROR:
return "evmc: internal error"
case C.EVMC_REJECTED: case C.EVMC_REJECTED:
return "evmc: rejected" return "evmc: rejected"
} }
if code < 0 { if code < 0 {
return fmt.Sprintf("evmc: unknown internal error (%d)", int32(code)) return fmt.Sprintf("evmc: internal error (%d)", int32(code))
} }
return fmt.Sprintf("evmc: unknown status code %d", int32(code)) return fmt.Sprintf("evmc: unknown non-fatal status code %d", int32(code))
} }
const ( const (