From f58b51896378a48337d1ad710e393b056f804462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 22 Mar 2012 17:38:33 +0100 Subject: [PATCH] Handle arbitrary Exceptions --- file/lib/form/ChatForm.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/file/lib/form/ChatForm.class.php b/file/lib/form/ChatForm.class.php index 64a2db5..763241d 100644 --- a/file/lib/form/ChatForm.class.php +++ b/file/lib/form/ChatForm.class.php @@ -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;