Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit debea42

Browse files
committed
Add new wrapper for newrelic_notice_error
1 parent acc49c1 commit debea42

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

app/code/Magento/NewRelicReporting/Model/NewRelicWrapper.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ public function addCustomParameter($param, $value)
2828
return false;
2929
}
3030

31+
/**
32+
* Wrapper for 'newrelic_notice_error' function
33+
*
34+
* @param Exception $exception
35+
* @return void
36+
*/
37+
public function reportError($exception)
38+
{
39+
if (extension_loaded('newrelic')) {
40+
newrelic_notice_error($exception->getMessage(), $exception);
41+
}
42+
}
43+
3144
/**
3245
* Checks whether newrelic-php5 agent is installed
3346
*

0 commit comments

Comments
 (0)