EventListener/BugsnagListener.php
public function onConsoleException(ConsoleExceptionEvent $event)
    {
        if (!$this->auto) {
            return;
        }

        $exception = $event->getException();

        $meta = [
            'command' => [
                'name' => $event->getCommand()->getName(),
                'status' => $event->getExitCode(),
            ],
        ];

        $report = Report::fromPHPThrowable(
            $this->client->getConfig(),
            $exception
        );
        $report->setUnhandled(true);
        $report->setSeverityReason([
            'type' => 'unhandledExceptionMiddleware',
            'attributes' => [
                'framework' => 'Symfony',
            ],
        ]);
        $report->setMetaData($meta);

        $this->client->notify($report);
    }
public function onConsoleException(ConsoleExceptionEvent $event)
    {
        if (!$this->auto) {
            return;
        }

        $exception = $event->getException();

        $meta = [
            'command' => [
                'name' => $event->getCommand()->getName(),
                'status' => $event->getExitCode(),
            ],
        ];

        $report = Report::fromPHPThrowable(
            $this->client->getConfig(),
            $exception
        );
        $report->setUnhandled(true);
        $report->setSeverityReason([
            'type' => 'unhandledExceptionMiddleware',
            'attributes' => [
                'framework' => 'Symfony',
            ],
        ]);
        $report->setMetaData($meta);

        $this->client->notify($report);
    }
public function onConsoleException ( ConsoleExceptionEvent $ event ) { if ( ! $ this -> auto ) { return ; } $ exception = $ event -> getException ( ) ; $ meta = [ 'command' => [ 'name' => $ event -> getCommand ( ) -> getName ( ) , 'status' => $ event -> getExitCode ( ) , ] , ] ; $ report = Report :: fromPHPThrowable ( $ this -> client -> getConfig ( ) , $ exception ) ; $ report -> setUnhandled ( true ) ; $ report -> setSeverityReason ( [ 'type' => 'unhandledExceptionMiddleware' , 'attributes' => [ 'framework' => 'Symfony' , ] , ] ) ; $ report -> setMetaData ( $ meta ) ; $ this -> client -> notify ( $ report ) ; }
Handle a console exception.

@param \Symfony\Component\Console\Event\ConsoleExceptionEvent $event

@return void
Handle a console exception .