Skip to content

Commit

Permalink
Added a check so only valid components are accepted
Browse files Browse the repository at this point in the history
  • Loading branch information
trustmaster committed Oct 25, 2013
1 parent d9928cb commit 03d7b89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions component.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ func RunProc(c interface{}) bool {
vCom := v.FieldByName("Component")
isComponent := vCom.IsValid() && vCom.Type().Name() == "Component"

if !isComponent {
panic("Argument of flow.Run() is not a flow.Component")
}

// Get the component mode
componentMode := DefaultComponentMode
if isComponent {
Expand Down

0 comments on commit 03d7b89

Please sign in to comment.