is_amoforms_exception($exception)) { $result = parent::captureException($exception, $culprit_or_options, $logger, $vars); } return $result; } /** * @param \Exception $exception * @return bool */ protected function is_amoforms_exception($exception) { if (!is_object($exception) || !($exception instanceof \Exception)) { return FALSE; } if ($exception instanceof Base) { return TRUE; } if ($this->is_amoforms_path($exception->getFile())) { return TRUE; } $count = 0; foreach ($exception->getTrace() as $action) { if (isset($action['file']) && $this->is_amoforms_path($action['file'])) { return TRUE; } if (++$count > 5) { break; } } return FALSE; } /** * @param string $path * @return bool */ protected function is_amoforms_path($path) { return strpos($path, '/plugins/amoforms/') !== FALSE; } /** * Small http info * @return array */ protected function get_http_data() { $data = parent::get_http_data(); $result = [ 'request' => [ 'method' => $data['request']['method'], 'url' => $data['request']['url'], 'query_string' => $data['request']['query_string'], ], ]; if(isset($data['request']['data'])){ $result['request']['data'] = $data['request']['data']; } return $result; } }