Skip to content

Commit

Permalink
Go bindings: panic on internal errors, but not on unknown status codes
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Aug 20, 2018
1 parent 496a57a commit 1a126f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bindings/go/evmc/evmc.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ func (err Error) Error() string {
}

if code < 0 {
return fmt.Sprintf("evmc: unknown internal error (%d)", int32(code))
panic(fmt.Sprintf("evmc: unknown internal error (%d)", int32(code)))
}

panic(fmt.Sprintf("evmc: unknown status code %d", int32(code)))
return fmt.Sprintf("evmc: unknown status code %d", int32(code))
}

const (
Expand Down

0 comments on commit 1a126f7

Please sign in to comment.