githubtrue/cron/db/db-exception.php @ master
1 | 574d6347 | horkym | <?php
|
---|---|---|---|
2 | |||
3 | 7cee2250 | horkym | require_once "/../logging.php"; |
4 | |||
5 | 574d6347 | horkym | class DB_Exception extends Exception { |
6 | |||
7 | 7cee2250 | horkym | public function __construct($logs = NULL, $message = false, $code = false) { |
8 | 574d6347 | horkym | if (!$message) { |
9 | $this->message = mysql_error(); |
||
10 | }
|
||
11 | if (!$code) { |
||
12 | $this->code = mysql_errno(); |
||
13 | }
|
||
14 | 7cee2250 | horkym | if ($logs != NULL) { |
15 | $logs->log(Logging::ERROR, $this->__toString()); |
||
16 | }
|
||
17 | 574d6347 | horkym | }
|
18 | |||
19 | }
|
||
20 | |||
21 | ?>
|