Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/JsonHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

namespace SMartins\Exceptions;

use Exception;
use SMartins\Exceptions\Handlers\Handler;
use Throwable;

trait JsonHandler
{
/**
* Handle the json response. Check if exception is treated. If true call
* the specific handler. If false set the default response to be returned.
*
* @param \Exception $exception
* @param \Throwable $exception
*
* @return \Illuminate\Http\JsonResponse
*/
public function jsonResponse(Exception $exception)
public function jsonResponse(Throwable $exception)
{
$handler = new Handler($exception);

Expand Down