Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
HttpPlugin.php
Go to the documentation of this file.
1 <?php
7 
12 
14 {
18  private $config;
19 
23  private $newRelicWrapper;
24 
29  public function __construct(
30  Config $config,
31  NewRelicWrapper $newRelicWrapper
32  ) {
33  $this->config = $config;
34  $this->newRelicWrapper = $newRelicWrapper;
35  }
36 
47  public function beforeCatchException(Http $subject, Bootstrap $bootstrap, \Exception $exception)
48  {
49  if ($this->config->isNewRelicEnabled()) {
50  $this->newRelicWrapper->reportError($exception);
51  }
52  }
53 }
$config
Definition: fraud_order.php:17
if(defined('TESTS_MAGENTO_INSTALLATION') &&TESTS_MAGENTO_INSTALLATION==='enabled') $bootstrap
Definition: bootstrap.php:73
__construct(Config $config, NewRelicWrapper $newRelicWrapper)
Definition: HttpPlugin.php:29
beforeCatchException(Http $subject, Bootstrap $bootstrap, \Exception $exception)
Definition: HttpPlugin.php:47