1 | <?php |
||
17 | class ErrorPanel extends Panel |
||
18 | { |
||
19 | use RendersSummaryChartTrait; |
||
20 | |||
21 | private $_exceptions = []; |
||
22 | |||
23 | 78 | /** |
|
24 | * @inheritdoc |
||
25 | 78 | */ |
|
26 | public function init() |
||
39 | |||
40 | |||
41 | /** |
||
42 | * Log an exception |
||
43 | * |
||
44 | * @param int $entry_id Entry to associate the error with |
||
45 | 30 | * @param \Exception|\Throwable $exception |
|
46 | * @return null|static |
||
47 | */ |
||
48 | 27 | public function log($entry_id, $exception) |
|
72 | |||
73 | /** |
||
74 | * Log a regular error message |
||
75 | * |
||
76 | * @param int $entry_id Entry to associate the error with |
||
77 | * @param string $message |
||
78 | * @param int $code |
||
79 | * @param string $file |
||
80 | * @param int $line |
||
81 | 6 | * @param array $trace Stack trace to include. Use `Helper::generateTrace()` to create it. |
|
82 | * @return null|static |
||
83 | 6 | */ |
|
84 | 6 | public function logMessage($entry_id, $message, $code = 0, $file = '', $line = 0, $trace = []) |
|
96 | |||
97 | 3 | /** |
|
98 | * @inheritdoc |
||
99 | 3 | */ |
|
100 | public function hasEntryData($entry) |
||
104 | |||
105 | 33 | /** |
|
106 | * @inheritdoc |
||
107 | 33 | */ |
|
108 | public function getName() |
||
112 | |||
113 | 3 | /** |
|
114 | * @inheritdoc |
||
115 | 3 | */ |
|
116 | public function getLabel() |
||
120 | |||
121 | 3 | /** |
|
122 | * @inheritdoc |
||
123 | 3 | */ |
|
124 | 3 | public function getDetail() |
|
137 | |||
138 | 33 | /** |
|
139 | * @inheritdoc |
||
140 | 33 | */ |
|
141 | public function getIndexUrl() |
||
145 | |||
146 | 3 | /** |
|
147 | * @inheritdoc |
||
148 | 3 | */ |
|
149 | 3 | protected function getChartModel() |
|
153 | |||
154 | /** |
||
155 | * @inheritdoc |
||
156 | 3 | */ |
|
157 | public function getChart() |
||
164 | 3 | ||
165 | /** |
||
166 | 3 | * @inheritdoc |
|
167 | 3 | */ |
|
168 | 3 | public function registerAssets($view) |
|
172 | |||
173 | /** |
||
174 | * @inheritdoc |
||
175 | */ |
||
176 | public function cleanup($maxAge = null) |
||
185 | |||
186 | } |