| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Yatra\Exceptions; |
| 6 |
|
| 7 |
/** |
| 8 |
* Trip Not Found Exception |
| 9 |
* |
| 10 |
* Thrown when a requested trip cannot be found |
| 11 |
*/ |
| 12 |
class TripNotFoundException extends YatraException |
| 13 |
{ |
| 14 |
protected string $errorCode = 'trip_not_found'; |
| 15 |
|
| 16 |
public function __construct(int $tripId, ?\Exception $previous = null) |
| 17 |
{ |
| 18 |
$message = sprintf('Trip with ID %d not found', $tripId); |
| 19 |
parent::__construct($message, 404, $previous, ['trip_id' => $tripId]); |
| 20 |
} |
| 21 |
} |
| 22 |
|