@@ -36,24 +36,24 @@ |
||
36 | 36 | { |
37 | 37 | try { |
38 | 38 | $log = new Log(); |
39 | - if(is_callable($this->context)) { |
|
39 | + if (is_callable($this->context)) { |
|
40 | 40 | try { |
41 | 41 | $this->context = call_user_func($this->context, $exception); |
42 | - } catch(\Exception $e) { |
|
42 | + } catch (\Exception $e) { |
|
43 | 43 | self::logInnerException(new \Exception('Can not call ' . (string) $this->context)); |
44 | 44 | } |
45 | 45 | } |
46 | - if(!is_array($this->context)) { |
|
46 | + if (!is_array($this->context)) { |
|
47 | 47 | $this->context = (!empty($this->context) ? [$this->context] : []); |
48 | 48 | } |
49 | - if($logType == \Bitrix\Main\Diag\ExceptionHandlerLog::LOW_PRIORITY_ERROR) { |
|
49 | + if ($logType == \Bitrix\Main\Diag\ExceptionHandlerLog::LOW_PRIORITY_ERROR) { |
|
50 | 50 | $log->error($exception, $this->context); |
51 | 51 | } else { |
52 | 52 | $this->context['source'] = self::logTypeToString($logType); |
53 | 53 | $log->telegram(LogLevel::CRITICAL, $exception, $this->context); |
54 | 54 | } |
55 | 55 | |
56 | - } catch(\Exception $e) { |
|
56 | + } catch (\Exception $e) { |
|
57 | 57 | self::logInnerException($e); |
58 | 58 | } |
59 | 59 | } |