Merge branch 'MDL-52199-incoming-nice-fail' of https://github.com/brendanheywood...
authorDan Poltawski <dan@moodle.com>
Wed, 30 Nov 2016 09:52:35 +0000 (09:52 +0000)
committerDan Poltawski <dan@moodle.com>
Wed, 30 Nov 2016 09:52:35 +0000 (09:52 +0000)
admin/tool/messageinbound/classes/manager.php

index fe33923..775f006 100644 (file)
@@ -125,9 +125,7 @@ class manager {
 
         } catch (\Horde_Imap_Client_Exception $e) {
             $message = $e->getMessage();
-            mtrace("Unable to connect to IMAP server. Failed with '{$message}'");
-
-            return false;
+            throw new \moodle_exception('imapconnectfailure', 'tool_messageinbound', '', null, $message);
         }
     }