|
|
@ -4,6 +4,9 @@ namespace App\Exceptions;
|
|
|
|
|
|
|
|
|
|
|
|
use Throwable;
|
|
|
|
use Throwable;
|
|
|
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
|
|
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
|
|
|
|
|
|
|
use WM\Core\Exceptions\ValidationErrorException;
|
|
|
|
|
|
|
|
use WM\Core\Services\Responser;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Handler extends ExceptionHandler
|
|
|
|
class Handler extends ExceptionHandler
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -46,6 +49,10 @@ class Handler extends ExceptionHandler
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function render($request, Throwable $exception)
|
|
|
|
public function render($request, Throwable $exception)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if ($exception instanceof ValidationErrorException) {
|
|
|
|
|
|
|
|
return response()->json(Responser::error('تاریخ مورد نظر در زمان انتخابی رزرو شده است',[trans('common::messages.over_lap_date')]), 500);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return parent::render($request, $exception);
|
|
|
|
return parent::render($request, $exception);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|