Conditions | 5 |
Paths | 8 |
Total Lines | 39 |
Code Lines | 26 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function render() : string |
||
30 | { |
||
31 | $finalCall = $this->info->getFinalCall(); |
||
32 | |||
33 | $message = sb() |
||
34 | ->t('A %1$s exception occurred.', $this->info->getClass()) |
||
35 | ->eol() |
||
36 | ->t('Code:') |
||
37 | ->add($this->info->getCode()) |
||
38 | ->t('Message:') |
||
39 | ->add($this->info->getMessage()); |
||
40 | |||
41 | if($this->developerInfo) |
||
42 | { |
||
43 | $message |
||
44 | ->eol() |
||
45 | ->t('Final call:') |
||
46 | ->add($finalCall->toString()); |
||
47 | } |
||
48 | |||
49 | if($this->developerInfo && $this->info->hasDetails()) |
||
50 | { |
||
51 | $message |
||
52 | ->t('Developer details:') |
||
53 | ->eol() |
||
54 | ->add($this->info->getDetails()); |
||
55 | } |
||
56 | |||
57 | if($this->info->hasPrevious()) |
||
58 | { |
||
59 | $message |
||
60 | ->eol() |
||
61 | ->eol() |
||
62 | ->t('Previous exception:') |
||
63 | ->eol() |
||
64 | ->add($this->info->getPrevious()->renderErrorMessage($this->developerInfo)); |
||
65 | } |
||
66 | |||
67 | return (string)$message; |
||
68 | } |
||
70 |