Skip to content

Commit 7e684b8

Browse files
Merge pull request #109 from solocommand/nr-errors
If NewRelic is available, notify about errors
2 parents 33c9824 + a3a9515 commit 7e684b8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Api/AbstractAdapter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ abstract protected function createRestResponse($status, Rest\RestPayload $payloa
211211
*/
212212
public function handleException(\Exception $e)
213213
{
214+
if (extension_loaded('newrelic')) {
215+
newrelic_notice_error($e->getMessage(), $e);
216+
}
214217
$refl = new \ReflectionClass($e);
215218
if ($e instanceof HttpExceptionInterface) {
216219
$title = sprintf('%s::%s', $refl->getShortName(), $e->getErrorType());

0 commit comments

Comments
 (0)