Return state error code
This commit is contained in:
@@ -39,7 +39,7 @@ func NewStateFromByteCode(byteCodes [][]byte) (*State, error) {
|
||||
return NewState(functions)
|
||||
}
|
||||
|
||||
func (state *State) Execute() {
|
||||
func (state *State) Execute() error {
|
||||
state.setHandlers()
|
||||
state.call(0)
|
||||
state.running = true
|
||||
@@ -47,6 +47,8 @@ func (state *State) Execute() {
|
||||
for state.running {
|
||||
state.processInstruction()
|
||||
}
|
||||
|
||||
return state.err
|
||||
}
|
||||
|
||||
func (state *State) stackFrame() *stackFrame {
|
||||
|
||||
Reference in New Issue
Block a user