Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| CrmException | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| report | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Exceptions\Api\V2; |
| 4 | |
| 5 | use Exception; |
| 6 | use Illuminate\Support\Facades\Log; |
| 7 | |
| 8 | /** |
| 9 | * This is a critical error. |
| 10 | * The request could not be handled. You may dump any value you can |
| 11 | * get before submitting a ticker to https://supportweb.ldc.fr |
| 12 | * |
| 13 | * @package LDCCrmClient |
| 14 | * @subpackage exceptions |
| 15 | */ |
| 16 | class CrmException extends Exception |
| 17 | { |
| 18 | /** |
| 19 | * This is used by laravel only. |
| 20 | * It uses Log class to print the error. |
| 21 | * |
| 22 | * @return void |
| 23 | */ |
| 24 | public function report(): void |
| 25 | { |
| 26 | Log::critical(sprintf('CRM API: %s', $this->getMessage())); |
| 27 | } |
| 28 | } |