public function report(Exception $e)
    {
        try {
            if (class_exists('\Nodes\Bugsnag\ServiceProvider')) {
                if (\Nodes\Bugsnag\ServiceProvider::VERSION == '1.0') {
                    if ($e instanceof NodesException && $e->getReport()) {
                        app('nodes.bugsnag')->notifyException($e, $e->getMeta(), $e->getSeverity());
                    } elseif (!$e instanceof NodesException) {
                        app('nodes.bugsnag')->notifyException($e, null, 'error');
                    }
                } elseif (\Nodes\Bugsnag\ServiceProvider::VERSION == '2.0') {
                    if ($e instanceof NodesException && $e->getReport()) {
                        app('nodes.bugsnag')->notifyException($e, function(\Bugsnag\Report $report) use ($e) {
                            $report->setMetaData($e->getMeta(), true);
                            $report->setSeverity($e->getSeverity());
                        });
                    } elseif (!$e instanceof NodesException) {
                        app('nodes.bugsnag')->notifyException($e, function(\Bugsnag\Report $report) {
                            $report->setSeverity('error');
                        });
                    }
                }
            }
        } catch (\Throwable $e) {
            // Do nothing
        }

        Log::error($e);
    }
public function report(Exception $e)
    {
        try {
            if (class_exists('\Nodes\Bugsnag\ServiceProvider')) {
                if (\Nodes\Bugsnag\ServiceProvider::VERSION == '1.0') {
                    if ($e instanceof NodesException && $e->getReport()) {
                        app('nodes.bugsnag')->notifyException($e, $e->getMeta(), $e->getSeverity());
                    } elseif (!$e instanceof NodesException) {
                        app('nodes.bugsnag')->notifyException($e, null, 'error');
                    }
                } elseif (\Nodes\Bugsnag\ServiceProvider::VERSION == '2.0') {
                    if ($e instanceof NodesException && $e->getReport()) {
                        app('nodes.bugsnag')->notifyException($e, function(\Bugsnag\Report $report) use ($e) {
                            $report->setMetaData($e->getMeta(), true);
                            $report->setSeverity($e->getSeverity());
                        });
                    } elseif (!$e instanceof NodesException) {
                        app('nodes.bugsnag')->notifyException($e, function(\Bugsnag\Report $report) {
                            $report->setSeverity('error');
                        });
                    }
                }
            }
        } catch (\Throwable $e) {
            // Do nothing
        }

        Log::error($e);
    }
public function report ( Exception $ e ) { try { if ( class_exists ( '\Nodes\Bugsnag\ServiceProvider' ) ) { if ( \ Nodes \ Bugsnag \ ServiceProvider :: VERSION == '1.0' ) { if ( $ e instanceof NodesException && $ e -> getReport ( ) ) { app ( 'nodes.bugsnag' ) -> notifyException ( $ e , $ e -> getMeta ( ) , $ e -> getSeverity ( ) ) ; } elseif ( ! $ e instanceof NodesException ) { app ( 'nodes.bugsnag' ) -> notifyException ( $ e , null , 'error' ) ; } } elseif ( \ Nodes \ Bugsnag \ ServiceProvider :: VERSION == '2.0' ) { if ( $ e instanceof NodesException && $ e -> getReport ( ) ) { app ( 'nodes.bugsnag' ) -> notifyException ( $ e , function ( \ Bugsnag \ Report $ report ) use ( $ e ) { $ report -> setMetaData ( $ e -> getMeta ( ) , true ) ; $ report -> setSeverity ( $ e -> getSeverity ( ) ) ; } ) ; } elseif ( ! $ e instanceof NodesException ) { app ( 'nodes.bugsnag' ) -> notifyException ( $ e , function ( \ Bugsnag \ Report $ report ) { $ report -> setSeverity ( 'error' ) ; } ) ; } } } } catch ( \ Throwable $ e ) { // Do nothing } Log :: error ( $ e ) ; }
Report and log an exception.

@author Morten Rugaard <moru@nodes.dk>
@author Rasmus Ebbesen <re@nodes.dk>

@param  Exception $e
@throws Exception
Report and log an exception .