diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-07-30 16:55:09 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-07-30 16:55:09 -0400 |
commit | 3af5774769bd1a8193b4061c0b94ed867272c485 (patch) | |
tree | 4307105a2c95bfaf69f00143613d94bacfed9130 /classes/File.php | |
parent | 8371aea9c1320f8902465dea8cdf1d45a789a971 (diff) |
throw an exception rather than die()
Diffstat (limited to 'classes/File.php')
-rw-r--r-- | classes/File.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/classes/File.php b/classes/File.php index 7f1e7881f..959301eda 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); |