1: <?php
2:
3: 4: 5: 6: 7:
8:
9:
10:
11: 12: 13: 14: 15:
16: class AbortException extends Exception
17: {
18: }
19:
20:
21: 22: 23: 24:
25: class ApplicationException extends Exception
26: {
27: public function __construct($message = '', $code = 0, Exception $previous = NULL)
28: {
29: if (PHP_VERSION_ID < 50300) {
30: $this->previous = $previous;
31: parent::__construct($message, $code);
32: } else {
33: parent::__construct($message, $code, $previous);
34: }
35: }
36: }
37:
38:
39: 40: 41: 42:
43: class InvalidPresenterException extends Exception
44: {
45: }
46:
47:
48: 49: 50: 51:
52: class BadRequestException extends Exception
53: {
54:
55: protected $defaultCode = 404;
56:
57:
58: public function __construct($message = '', $code = 0, Exception $previous = NULL)
59: {
60: if ($code < 200 || $code > 504) {
61: $code = $this->defaultCode;
62: }
63:
64: if (PHP_VERSION_ID < 50300) {
65: $this->previous = $previous;
66: parent::__construct($message, $code);
67: } else {
68: parent::__construct($message, $code, $previous);
69: }
70: }
71:
72: }
73:
74:
75: 76: 77: 78:
79: class ForbiddenRequestException extends BadRequestException
80: {
81:
82: protected $defaultCode = 403;
83:
84: }
85: