0 follower

Final Class Yiisoft\Yii\Sentry\SentryConsoleHandler

InheritanceYiisoft\Yii\Sentry\SentryConsoleHandler

Catches console application exceptions and forwards them to Sentry.

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( \Sentry\State\HubInterface $hub )
$hub \Sentry\State\HubInterface

                public function __construct(private readonly HubInterface $hub)
{
}

            
handle() public method

public void handle ( \Symfony\Component\Console\Event\ConsoleErrorEvent $event )
$event \Symfony\Component\Console\Event\ConsoleErrorEvent

                public function handle(ConsoleErrorEvent $event): void
{
    $this->hub->captureException($event->getError());
}