From: Evan Prodromou Date: Thu, 30 Jul 2009 20:55:09 +0000 (-0400) Subject: throw an exception rather than die() X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3af5774769bd1a8193b4061c0b94ed867272c485;p=quix0rs-gnu-social.git throw an exception rather than die() --- diff --git a/classes/File.php b/classes/File.php index 7f1e7881f8..959301edae 100644 --- a/classes/File.php +++ b/classes/File.php @@ -113,7 +113,9 @@ class File extends Memcached_DataObject if (empty($x)) { $x = File::staticGet($file_id); - if (empty($x)) die('Impossible!'); + if (empty($x)) { + throw new ServerException("Robin thinks something is impossible."); + } } File_to_post::processNew($file_id, $notice_id);