public function sendEmail(Exception $exception)
    {
        try {
            $e = FlattenException::create($exception);
            $handler = new SymfonyExceptionHandler();
            $html = $handler->getHtml($e);

            Mail::send(new ExceptionOccured($html));
        } catch (Exception $exception) {
            Log::error($exception);
        }
    }
public function sendEmail(Exception $exception)
    {
        try {
            $e = FlattenException::create($exception);
            $handler = new SymfonyExceptionHandler();
            $html = $handler->getHtml($e);

            Mail::send(new ExceptionOccured($html));
        } catch (Exception $exception) {
            Log::error($exception);
        }
    }
public function sendEmail ( Exception $ exception ) { try { $ e = FlattenException :: create ( $ exception ) ; $ handler = new SymfonyExceptionHandler ( ) ; $ html = $ handler -> getHtml ( $ e ) ; Mail :: send ( new ExceptionOccured ( $ html ) ) ; } catch ( Exception $ exception ) { Log :: error ( $ exception ) ; } }
Sends an email upon exception.

@param \Exception $exception

@return void
Sends an email upon exception .