Fix error functions

This commit is contained in:
Alexander Ivanov 2018-02-16 11:32:25 +02:00
parent 9c056b85de
commit aa1970013d
1 changed files with 8 additions and 23 deletions

View File

@ -67,27 +67,12 @@ type
NotImplementedError* = object of VMError
## Not implemented error
#proc makeVMError*: ref VMError =
# var e: ref VMError
# new(e)
# e.burnsGas = true
# e.erasesReturnData = true
#var a: ref VMError
#new(a)
proc makeVMError*: ref VMError =
new(result)
result.burnsGas = true
result.erasesReturnData = true
# proc makeRevert*(): Revert =
# result.burnsGas = false
# result.erasesReturnData = false
#var e = VMError()
#raise makeVMError()
#var e: ref VMError
#new(e)
#echo e[]
#proc x* =
# raise newException(VMError, "")
#var e = makeVMError()
#echo e[]
#x()
proc makeRevert*(): ref Revert =
new(result)
result.burnsGas = false
result.erasesReturnData = false