1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2025-01-10 00:30:09 +00:00

Handle arbitrary Exceptions

This commit is contained in:
Tim Düsterhus 2012-03-22 17:38:33 +01:00
parent 4a901569bd
commit f58b518963

View File

@ -90,6 +90,11 @@ public function save() {
$type = chat\message\ChatMessage::TYPE_ERROR;
$receiver = WCF::getUser()->userID;
}
catch (\Exception $e) {
$this->message = WCF::getLanguage()->get('wcf.chat.command.error.exception');
$type = chat\message\ChatMessage::TYPE_ERROR;
$receiver = WCF::getUser()->userID;
}
}
else {
$type = chat\message\ChatMessage::TYPE_NORMAL;