core/vm: Improved error reporting for trace logging

This commit is contained in:
obscuren
2015-06-12 13:35:14 +02:00
parent 02d629af8f
commit 287f990891
4 changed files with 49 additions and 50 deletions

View File

@ -2,20 +2,14 @@ package vm
import (
"fmt"
"github.com/ethereum/go-ethereum/params"
"math/big"
)
type OutOfGasError struct {
req, has *big.Int
}
func OOG(req, has *big.Int) OutOfGasError {
return OutOfGasError{req, has}
}
type OutOfGasError struct{}
func (self OutOfGasError) Error() string {
return fmt.Sprintf("out of gas! require %v, have %v", self.req, self.has)
return "Out Of Gas"
}
func IsOOGErr(err error) bool {