MDL-52199 core_message: IMAP errors passed to task api
authorBrendan Heywood <brendan@catalyst-au.net>
Mon, 14 Nov 2016 11:00:55 +0000 (22:00 +1100)
committerBrendan Heywood <brendan@catalyst-au.net>
Tue, 22 Nov 2016 01:44:30 +0000 (12:44 +1100)
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);
         }
     }