aboutsummaryrefslogtreecommitdiffstats
path: root/core/vm/errors.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-07-06 16:51:14 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-07-06 16:51:14 +0800
commit46e7c8512edd6de49c546467505673155ebbd1c2 (patch)
tree5941123c1c1ad743d2e4e231481fdb93d005224c /core/vm/errors.go
parent9c3db1be1dd24c366a58a7ced22adfa0b0839efe (diff)
parent0f04af5916cba5234118a442b6100c8122389abf (diff)
downloaddexon-46e7c8512edd6de49c546467505673155ebbd1c2.tar
dexon-46e7c8512edd6de49c546467505673155ebbd1c2.tar.gz
dexon-46e7c8512edd6de49c546467505673155ebbd1c2.tar.bz2
dexon-46e7c8512edd6de49c546467505673155ebbd1c2.tar.lz
dexon-46e7c8512edd6de49c546467505673155ebbd1c2.tar.xz
dexon-46e7c8512edd6de49c546467505673155ebbd1c2.tar.zst
dexon-46e7c8512edd6de49c546467505673155ebbd1c2.zip
Merge pull request #1395 from Gustav-Simonsson/fix_core_errors_in_apply_txs
Fix core errors in apply txs
Diffstat (limited to 'core/vm/errors.go')
-rw-r--r--core/vm/errors.go24
1 files changed, 3 insertions, 21 deletions
diff --git a/core/vm/errors.go b/core/vm/errors.go
index 799eb6797..75b9c0f10 100644
--- a/core/vm/errors.go
+++ b/core/vm/errors.go
@@ -1,21 +1,14 @@
package vm
import (
+ "errors"
"fmt"
"github.com/ethereum/go-ethereum/params"
)
-type OutOfGasError struct{}
-
-func (self OutOfGasError) Error() string {
- return "Out Of Gas"
-}
-
-func IsOOGErr(err error) bool {
- _, ok := err.(OutOfGasError)
- return ok
-}
+var OutOfGasError = errors.New("Out of gas")
+var DepthError = fmt.Errorf("Max call depth exceeded (%d)", params.CallCreateDepth)
type StackError struct {
req, has int
@@ -33,14 +26,3 @@ func IsStack(err error) bool {
_, ok := err.(StackError)
return ok
}
-
-type DepthError struct{}
-
-func (self DepthError) Error() string {
- return fmt.Sprintf("Max call depth exceeded (%d)", params.CallCreateDepth)
-}
-
-func IsDepthErr(err error) bool {
- _, ok := err.(DepthError)
- return ok
-}