mirror of
https://github.com/typecho/typecho.git
synced 2025-01-17 12:38:28 +01:00
fix db exception
This commit is contained in:
parent
0bdf8721e1
commit
6100695d87
@ -230,10 +230,10 @@ namespace Typecho {
|
||||
//覆盖原始错误信息
|
||||
$message = 'Database Server Error';
|
||||
|
||||
if ($exception instanceof \Typecho\Db\Adapter\SQLException) {
|
||||
if ($exception instanceof \Typecho\Db\Adapter\ConnectionException) {
|
||||
$code = 503;
|
||||
$message = 'Error establishing a database connection';
|
||||
} elseif ($exception instanceof \Typecho\Db\Query\Exception) {
|
||||
} elseif ($exception instanceof \Typecho\Db\Adapter\SQLException) {
|
||||
$message = 'Database Query Error';
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user