mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-17 20:32:41 +01:00
Catch any exceptions thrown when handling mail
Summary: This makes debugging issues a lot easier, since any exceptions thrown gets logged and can be seen at /mail/received/, for inspection. Test Plan: Created a task via the public-author functionality, and saw no errors without this patch applied. Even worse, the exception was never shown at command line either. Not sure what's up with that. Output buffering, or whatever? Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley, davidreuss Differential Revision: 1042
This commit is contained in:
parent
4e900c096f
commit
13d15276a5
1 changed files with 11 additions and 3 deletions
|
@ -60,7 +60,15 @@ foreach ($parser->getAttachments() as $attachment) {
|
|||
));
|
||||
$attachments[] = $file->getPHID();
|
||||
}
|
||||
$received->setAttachments($attachments);
|
||||
$received->save();
|
||||
|
||||
$received->processReceivedMail();
|
||||
try {
|
||||
$received->setAttachments($attachments);
|
||||
$received->save();
|
||||
$received->processReceivedMail();
|
||||
} catch (Exception $e) {
|
||||
$received
|
||||
->setMessage('EXCEPTION: '.$e->getMessage())
|
||||
->save();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue