Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
v-rudkovskiy committed Apr 1, 2020
1 parent 37db51e commit d28b645
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Exceptions;

use Illuminate\Notifications\Messages\MailMessage;
use Throwable;
use Illuminate\Mail\Message;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;

Expand All @@ -26,7 +26,7 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
* @param Throwable $exception
* @param Throwable $exception
* @return void
*
* @throws \Exception
Expand All @@ -42,8 +42,8 @@ public function report(Throwable $exception)
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Throwable
Expand All @@ -56,8 +56,8 @@ public function render($request, Throwable $exception)
/**
* Convert an authentication exception into a response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Symfony\Component\HttpFoundation\Response
*/
protected function unauthenticated($request, AuthenticationException $exception)
Expand All @@ -84,8 +84,7 @@ protected function sendReport(Throwable $exception)

$emails = is_string($emails) ? explode(',', $emails) : $emails;

\Mail::raw((string)$exception, function ($message) use ($exception, $emails) {
// TODO(RVA) need to check
\Mail::raw((string)$exception, function (Message $message) use ($exception, $emails) {
$message->to($emails)->subject(config('app.name') . ' ' . config('app.env') . ' | Error ' . class_basename($exception));
});
}
Expand Down

0 comments on commit d28b645

Please sign in to comment.