(ctx core.IntegrationMessageContext)
| 117 | } |
| 118 | |
| 119 | func (s *PanicableTrigger) OnIntegrationMessage(ctx core.IntegrationMessageContext) (err error) { |
| 120 | defer func() { |
| 121 | if r := recover(); r != nil { |
| 122 | ctx.Logger.Errorf("Trigger %s panicked in OnIntegrationMessage(): %v\nStack: %s", |
| 123 | s.underlying.Name(), r, debug.Stack()) |
| 124 | err = fmt.Errorf("trigger %s panicked in OnIntegrationMessage(): %v", |
| 125 | s.underlying.Name(), r) |
| 126 | } |
| 127 | }() |
| 128 | |
| 129 | integrationTrigger, ok := s.underlying.(core.IntegrationTrigger) |
| 130 | if !ok { |
| 131 | return fmt.Errorf("trigger %s is not an integration trigger", s.underlying.Name()) |
| 132 | } |
| 133 | |
| 134 | return integrationTrigger.OnIntegrationMessage(ctx) |
| 135 | } |
nothing calls this directly
no test coverage detected