(msg sequenceMsg)
| 890 | } |
| 891 | |
| 892 | func (p *Program) execSequenceMsg(msg sequenceMsg) { |
| 893 | if !p.disableCatchPanics { |
| 894 | defer func() { |
| 895 | if r := recover(); r != nil { |
| 896 | p.recoverFromGoPanic(r) |
| 897 | } |
| 898 | }() |
| 899 | } |
| 900 | |
| 901 | // Execute commands one at a time, in order. |
| 902 | for _, cmd := range msg { |
| 903 | if cmd == nil { |
| 904 | continue |
| 905 | } |
| 906 | msg := cmd() |
| 907 | switch msg := msg.(type) { |
| 908 | case BatchMsg: |
| 909 | p.execBatchMsg(msg) |
| 910 | case sequenceMsg: |
| 911 | p.execSequenceMsg(msg) |
| 912 | default: |
| 913 | p.Send(msg) |
| 914 | } |
| 915 | } |
| 916 | } |
| 917 | |
| 918 | func (p *Program) execBatchMsg(msg BatchMsg) { |
| 919 | if !p.disableCatchPanics { |
no test coverage detected