Skip to content

Commit

Permalink
improve send_event error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Klotzbuecher committed Jun 19, 2012
1 parent 76ff427 commit accf8a4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rfsm.lua
Original file line number Diff line number Diff line change
Expand Up @@ -744,11 +744,9 @@ end
----------------------------------------
-- send events to the local fsm event queue
function send_events(fsm, ...)
if not is_initialized_root(fsm) then fsm.err("ERROR send_events: invalid fsm") end
if not fsm or not is_initialized_root(fsm) then error("ERROR send_events: invalid fsm argument") end
fsm.dbg("RAISED", ...)
for _,v in ipairs({...}) do
table.insert(fsm._intq, v)
end
for _,v in ipairs({...}) do table.insert(fsm._intq, v) end
end

-- 1. walk up source path until root
Expand Down

0 comments on commit accf8a4

Please sign in to comment.