(msg sequenceMsg)
| 957 | } |
| 958 | |
| 959 | func (p *Program) execSequenceMsg(msg sequenceMsg) { |
| 960 | if !p.disableCatchPanics { |
| 961 | defer func() { |
| 962 | if r := recover(); r != nil { |
| 963 | p.recoverFromGoPanic(r) |
| 964 | } |
| 965 | }() |
| 966 | } |
| 967 | |
| 968 | // Execute commands one at a time, in order. |
| 969 | for _, cmd := range msg { |
| 970 | if cmd == nil { |
| 971 | continue |
| 972 | } |
| 973 | msg := cmd() |
| 974 | switch msg := msg.(type) { |
| 975 | case BatchMsg: |
| 976 | p.execBatchMsg(msg) |
| 977 | case sequenceMsg: |
| 978 | p.execSequenceMsg(msg) |
| 979 | default: |
| 980 | p.Send(msg) |
| 981 | } |
| 982 | } |
| 983 | } |
| 984 | |
| 985 | func (p *Program) execBatchMsg(msg BatchMsg) { |
| 986 | if !p.disableCatchPanics { |
no test coverage detected