| Conditions | 4 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 25 | protected function write(array $record) |
||
| 26 | { |
||
| 27 | if (isset($record['context'])) { |
||
| 28 | if (!isset($record['context']['exception'])) { |
||
| 29 | $this->getBugsnag()->sendError($record['message']); |
||
| 30 | return; |
||
| 31 | } |
||
| 32 | //check if $record['context']['exception'] is an instance of \Exception |
||
| 33 | if ($record['context']['exception'] instanceof \Exception) { |
||
| 34 | $this->getBugsnag() |
||
| 35 | ->addUserInfo() |
||
| 36 | ->addPackagesWithVersions() |
||
| 37 | ->sendException( |
||
| 38 | $record['context']['exception'], |
||
| 39 | $this->levelToSeverity($record['level']), |
||
| 40 | true, |
||
| 41 | false |
||
| 42 | ); |
||
| 43 | return; |
||
| 44 | } |
||
| 45 | $this->getBugsnag()->sendError($record['message']); |
||
| 46 | } |
||
| 78 |