| 1 | <?php |
||
| 24 | trait ExceptionHelperTrait |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * @param string $message |
||
| 28 | * @param \Exception|null $previous |
||
| 29 | * |
||
| 30 | * @return BadRequestHttpException |
||
| 31 | */ |
||
| 32 | protected function createBadRequestException(string $message = 'Wrong Request', ?\Exception $previous = null): BadRequestHttpException |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param string $message |
||
| 39 | * @param \Exception|null $previous |
||
| 40 | * |
||
| 41 | * @return UnauthorizedHttpException |
||
| 42 | */ |
||
| 43 | protected function createUnauthorizedException(string $message = 'Invalid Credentials', ?\Exception $previous = null): UnauthorizedHttpException |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param string $message |
||
| 50 | * @param \Exception|null $previous |
||
| 51 | * |
||
| 52 | * @return ServerInternalErrorException |
||
| 53 | */ |
||
| 54 | protected function createInternalServerErrorException(string $message = 'Internal Server Error', ?\Exception $previous = null): ServerInternalErrorException |
||
| 58 | } |
||
| 59 |