core/vm: Improved error reporting for trace logging
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user