1: <?php
2: namespace Izberg\Exception;
3: use Exception;
4: use RuntimeException;
5:
6:
7: /**
8: * Represents an HTTP 404 error.
9: */
10: class NotFoundException extends HttpException {
11: /**
12: * Constructor
13: *
14: * @param string $message If no message is given 'Not Found' will be the message
15: * @param string $code Status code, defaults to 404
16: */
17: public function __construct($message = null, $code = 404) {
18: if (empty($message)) {
19: $message = 'Not Found';
20: }
21: parent::__construct($message, $code);
22: }
23: }
24: