class ChannelException extends NotificationException

Handles exceptions related to channels. Extends the NotificationException class.

Methods

__construct(string $channel, string $message = '', Throwable|null $previous = null)

Create a channel-scoped notification exception.

Details

at line 25
__construct(string $channel, string $message = '', Throwable|null $previous = null)

Create a channel-scoped notification exception.

The final exception message is prefixed with the channel in square brackets, e.g. "[mail] Transport unavailable". The channel name is also stored on the exception as a readonly property for structured logging.

Parameters

string $channel

Short channel name (e.g. "mail", "database").

string $message

Optional human-readable details.

Throwable|null $previous

Optional underlying cause for exception chaining.