From 3af5774769bd1a8193b4061c0b94ed867272c485 Mon Sep 17 00:00:00 2001
From: Evan Prodromou <evan@controlyourself.ca>
Date: Thu, 30 Jul 2009 16:55:09 -0400
Subject: [PATCH] throw an exception rather than die()

---
 classes/File.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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);
-- 
2.39.5