]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Message.php
newmessage (and Message class) fixed for FormAction
[quix0rs-gnu-social.git] / classes / Message.php
index 7e8cd6245dd9f019bf39061c57575d6f698743f0..c5aefcc4e8d11bb832348157011d6165e4aab315 100644 (file)
@@ -96,7 +96,7 @@ class Message extends Managed_DataObject
         if (!$result) {
             common_log_db_error($msg, 'INSERT', __FILE__);
             // TRANS: Message given when a message could not be stored on the server.
-            return _('Could not insert message.');
+            throw new ServerException(_('Could not insert message.'));
         }
 
         $orig = clone($msg);
@@ -107,7 +107,7 @@ class Message extends Managed_DataObject
         if (!$result) {
             common_log_db_error($msg, 'UPDATE', __FILE__);
             // TRANS: Message given when a message could not be updated on the server.
-            return _('Could not update message with new URI.');
+            throw new ServerException(_('Could not update message with new URI.'));
         }
 
         return $msg;