diff --git a/core/includes/file.inc b/core/includes/file.inc
index 858c4a6..9f00f12 100644
--- a/core/includes/file.inc
+++ b/core/includes/file.inc
@@ -549,15 +549,14 @@ function file_unmanaged_copy($source, $destination = NULL, $replace = FILE_EXIST
 
   // Assert that the source file actually exists.
   if (!file_exists($source)) {
-    // @todo Replace drupal_set_message() calls with exceptions instead.
-    drupal_set_message(t('The specified file %file could not be copied because no file by that name exists. Please check that you supplied the correct filename.', array('%file' => $original_source)), 'error');
     if (($realpath = drupal_realpath($original_source)) !== FALSE) {
       $logger->notice('File %file (%realpath) could not be copied because it does not exist.', array('%file' => $original_source, '%realpath' => $realpath));
+      throw new Exception('The specified file %file could not be copied, because no file by that name exists. Please check that you supplied the correct filename.', array('%file' => $original_source));
     }
     else {
       $logger->notice('File %file could not be copied because it does not exist.', array('%file' => $original_source));
+      throw new Exception('The specified file %file could not be copied, because no file by that name exists. Please check that you supplied the correct filename.', array('%file' => $original_source));
     }
-    return FALSE;
   }
 
   // Build a destination URI if necessary.
