Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ReportApplicationHandledExceptionToNewRelic.php
Go to the documentation of this file.
1 <?php
7 
12 
17 {
21  private $config;
22 
26  private $newRelicWrapper;
27 
32  public function __construct(
33  Config $config,
34  NewRelicWrapper $newRelicWrapper
35  ) {
36  $this->config = $config;
37  $this->newRelicWrapper = $newRelicWrapper;
38  }
39 
43  public function execute(Observer $observer)
44  {
45  if ($this->config->isNewRelicEnabled()) {
46  $exception = $observer->getEvent()->getException();
47  $this->newRelicWrapper->reportError($exception);
48  }
49  }
50 }
$config
Definition: fraud_order.php:17