1 <?php
2
3 4 5
6 class rex_exception extends Exception
7 {
8 9 10 11
12 public function __construct($message, Exception $previous = null)
13 {
14 parent::__construct($message, 0, $previous);
15 }
16 }
17
18 19 20
21 class rex_sql_exception extends rex_exception
22 {
23 private $sql;
24
25 public function __construct($message, Exception $previous = null, rex_sql $sql = null)
26 {
27 parent::__construct($message, $previous);
28
29 $this->sql = $sql;
30 }
31
32 33 34
35 public function getSql()
36 {
37 return $this->sql;
38 }
39 }
40
41 42 43 44 45
46 class rex_functional_exception extends rex_exception
47 {
48 }
49
50 51 52 53 54
55 class rex_http_exception extends rex_exception
56 {
57 private $httpCode;
58
59 60 61 62
63 public function __construct(Exception $cause, $httpCode)
64 {
65 parent::__construct($cause->getMessage(), $cause);
66 $this->httpCode = $httpCode;
67 }
68
69 70 71
72 public function getHttpCode()
73 {
74 return $this->httpCode;
75 }
76 }
77
78 79 80 81 82
83 class rex_yaml_parse_exception extends rex_exception
84 {
85 }
86