aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-30 17:48:37 +0800
committerobscuren <geffobscura@gmail.com>2014-05-30 17:48:37 +0800
commit6c91ffcfbe1a7b469dc6a8a2676959f0000c925a (patch)
tree1c4c5e59eba2f31075773a300dfb2793f6f1efe3
parent15e0093e13dde98fb9ff3251203313ab4f0eacd4 (diff)
downloaddexon-6c91ffcfbe1a7b469dc6a8a2676959f0000c925a.tar
dexon-6c91ffcfbe1a7b469dc6a8a2676959f0000c925a.tar.gz
dexon-6c91ffcfbe1a7b469dc6a8a2676959f0000c925a.tar.bz2
dexon-6c91ffcfbe1a7b469dc6a8a2676959f0000c925a.tar.lz
dexon-6c91ffcfbe1a7b469dc6a8a2676959f0000c925a.tar.xz
dexon-6c91ffcfbe1a7b469dc6a8a2676959f0000c925a.tar.zst
dexon-6c91ffcfbe1a7b469dc6a8a2676959f0000c925a.zip
Do not panic, but return nil instead
-rw-r--r--ethutil/value.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethutil/value.go b/ethutil/value.go
index 83600abc2..c86c24a7a 100644
--- a/ethutil/value.go
+++ b/ethutil/value.go
@@ -176,7 +176,7 @@ func (val *Value) Get(idx int) *Value {
}
if idx < 0 {
- panic("negative idx for Value Get")
+ return NewValue(nil)
}
return NewValue(d[idx])