Use exceptions for S3 error messages
Summary: Right now, the "SimpleEmailService" class uses trigger_error() to communicate error messages. This means they get lost in the error logs and aren't visible in the MetaMTA interface. Provide a flag to strengthen them into exceptions, instead. (I've attempted to emulate the prevailing style so I can offer this upstream.) Test Plan: Faked an error condition and got a detailed stack trace in MetaMTA instead of an empty "Message" field. Reviewed By: jungejason Reviewers: hunterbridges, codeblock, jungejason, tuomaspelkonen, aran CC: aran, jungejason Differential Revision: 783
This commit is contained in:
@@ -42,6 +42,7 @@ class PhabricatorMailImplementationAmazonSESAdapter
|
||||
require_once $root.'/externals/amazon-ses/ses.php';
|
||||
|
||||
$service = newv('SimpleEmailService', array($key, $secret));
|
||||
$service->enableUseExceptions(true);
|
||||
return $service->sendRawEmail($body);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user