aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/error.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-13 18:45:11 +0800
committerobscuren <geffobscura@gmail.com>2014-06-13 18:45:11 +0800
commitd078e9b8c92fb3bd5789a8e39c169b19864e0a04 (patch)
tree34ce9defddbd84364e681362eef072fa5e5dab97 /ethchain/error.go
parentb855e5f7df194c84651d7cc7ee32d307a2fa0a2e (diff)
downloadgo-tangerine-d078e9b8c92fb3bd5789a8e39c169b19864e0a04.tar
go-tangerine-d078e9b8c92fb3bd5789a8e39c169b19864e0a04.tar.gz
go-tangerine-d078e9b8c92fb3bd5789a8e39c169b19864e0a04.tar.bz2
go-tangerine-d078e9b8c92fb3bd5789a8e39c169b19864e0a04.tar.lz
go-tangerine-d078e9b8c92fb3bd5789a8e39c169b19864e0a04.tar.xz
go-tangerine-d078e9b8c92fb3bd5789a8e39c169b19864e0a04.tar.zst
go-tangerine-d078e9b8c92fb3bd5789a8e39c169b19864e0a04.zip
Refactoring state transitioning
Diffstat (limited to 'ethchain/error.go')
-rw-r--r--ethchain/error.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/ethchain/error.go b/ethchain/error.go
index 29896bc59..2cf09a1ec 100644
--- a/ethchain/error.go
+++ b/ethchain/error.go
@@ -79,3 +79,20 @@ func IsNonceErr(err error) bool {
return ok
}
+
+type OutOfGasErr struct {
+ Message string
+}
+
+func OutOfGasError() *OutOfGasErr {
+ return &OutOfGasErr{Message: "Out of gas"}
+}
+func (self *OutOfGasErr) Error() string {
+ return self.Message
+}
+
+func IsOutOfGasErr(err error) bool {
+ _, ok := err.(*OutOfGasErr)
+
+ return ok
+}