HomeDevCentral

Explicitely log exception message

Description

Explicitely log exception message

Summary:
The notifications center logs exceptions thrown's messages,
and to do so pass the exception to the log method.

As this method wants a string as parameter, it was converted as string.
But as we plan to use declare(strict_types=1), such implicit conver-
sion isn't welcome.

Fixes the following issue detected by phan:

app/Exceptions/Handler.php:49
PhanTypeMismatchArgument
Argument 1 (message) is \Exception|\Throwable but
\Psr\Log\LoggerInterface::error() takes string defined at
vendor/psr/log/Psr/Log/LoggerInterface.php:66

Test Plan: phan | grep PhanTypeMismatchArgument

Reviewers: dereckson

Reviewed By: dereckson

Subscribers: alken-orin

Differential Revision: https://devcentral.nasqueron.org/D778

Details

Provenance
derecksonAuthored on Dec 30 2016, 02:01
Reviewer
dereckson
Differential Revision
D778: Explicitely log exception message
Parents
rNOTIF1b9b8f0ecda7: Define BasePayloadAnalyzer::SERVICE_NAME
Branches
Unknown
Tags
Unknown