Fix missing WidgetException error message (#1730)

This commit is contained in:
Luffy 2024-04-19 12:11:39 +08:00 committed by GitHub
parent 71c6381b15
commit 0b0476e565
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -236,6 +236,8 @@ namespace Typecho {
} elseif ($exception instanceof \Typecho\Db\Adapter\SQLException) {
$message = 'Database Query Error';
}
} elseif ($exception instanceof \Typecho\Widget\Exception) {
$message = $exception->getMessage();
} else {
$message = 'Server Error';
}