2021-03-14 10:45:42 +01:00
|
|
|
<?php
|
|
|
|
|
|
2021-07-28 14:18:47 +02:00
|
|
|
namespace App\Exceptions\Api\V2;
|
2021-03-14 10:45:42 +01:00
|
|
|
|
|
|
|
|
use Exception;
|
|
|
|
|
use Illuminate\Support\Facades\Log;
|
|
|
|
|
|
2021-08-09 08:55:39 +02:00
|
|
|
/**
|
|
|
|
|
* This is a critical error.
|
|
|
|
|
* The request could not be handled. You may dump any value you can
|
|
|
|
|
* get before submitting a ticker to https://supportweb.ldc.fr
|
|
|
|
|
*
|
|
|
|
|
* @package LDCCrmClient
|
|
|
|
|
* @subpackage exceptions
|
|
|
|
|
*/
|
2021-03-14 10:45:42 +01:00
|
|
|
class CrmException extends Exception
|
|
|
|
|
{
|
2021-12-19 15:57:24 +01:00
|
|
|
/**
|
|
|
|
|
* This is used by laravel only.
|
|
|
|
|
* It uses Log class to print the error.
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
2023-09-06 17:24:53 +02:00
|
|
|
public function report(): void
|
2021-03-14 10:45:42 +01:00
|
|
|
{
|
|
|
|
|
Log::critical(sprintf('CRM API: %s', $this->getMessage()));
|
|
|
|
|
}
|
|
|
|
|
}
|