-
-
Notifications
You must be signed in to change notification settings - Fork 0
ErrorEvent
github-actions edited this page Apr 6, 2026
·
1 revision
Represent a listener failure as a dispatchable event.
The dispatcher emits this event when a listener throws while handling another event.
- Full name:
\FastForward\EventDispatcher\Event\ErrorEvent - Parent class:
Exception - This class is marked as final and can't be subclassed
- This class implements:
StoppableEventInterface - This class is a Final class
Create an error event from a failed listener invocation.
public __construct(object $event, callable $listener, \Throwable $throwable, bool $propagationStopped = false): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$event |
object | original event being dispatched |
$listener |
callable | listener that raised the throwable |
$throwable |
\Throwable | throwable raised by the listener |
$propagationStopped |
bool | initial propagation state for this error event |
Determine whether propagation for this error event has been stopped.
public isPropagationStopped(): boolReturn Value:
whether propagation is currently stopped
Mark this error event as stopped.
public stopPropagation(): voidGet the original event that was being dispatched.
public getEvent(): objectReturn Value:
event instance associated with the listener failure
Get the listener that raised the throwable.
public getListener(): callableReturn Value:
listener associated with this error event
Get the throwable that caused this error event.
public getThrowable(): \ThrowableReturn Value:
throwable stored as the previous exception