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