accounts/abi: change from panic to basic error

Signed-off-by: RJ Catalano <rj@monax.io>
This commit is contained in:
RJ Catalano 2017-06-16 12:33:14 -05:00
parent 98a4ae555e
commit f581d544cb
No known key found for this signature in database
GPG key ID: D4AB109D9B5D6386

View file

@ -162,7 +162,7 @@ func readInteger(kind reflect.Kind, b []byte) interface{} {
func readBool(word []byte) (bool, error) {
if len(word) != 32 {
panic("abi: fatal error: incorrect word length")
return nil, fmt.Errorf("abi: fatal error: incorrect word length")
}
improperEncoding := "abi: improperly encoded boolean value"
for i, b := range word {