throw an exception rather than die()

This commit is contained in:
Evan Prodromou 2009-07-30 16:55:09 -04:00
parent 8371aea9c1
commit 3af5774769

View File

@ -113,7 +113,9 @@ class File extends Memcached_DataObject
if (empty($x)) { if (empty($x)) {
$x = File::staticGet($file_id); $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); File_to_post::processNew($file_id, $notice_id);