25 lines
537 B
PHP
25 lines
537 B
PHP
<?php
|
|
|
|
namespace App\Exceptions\Api;
|
|
|
|
use Exception;
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
/**
|
|
* This is a critical error.
|
|
* The request could not be handled. You may dump any value you can
|
|
* get before submitting a ticket to https://supportweb.ldc.fr
|
|
*/
|
|
class ApplicationException extends Exception
|
|
{
|
|
/**
|
|
* This is used by laravel only.
|
|
* It uses Log class to print the error.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function report()
|
|
{
|
|
Log::critical(sprintf('API: %s', $this->getMessage()));
|
|
}
|
|
}
|