Unverified Commit 6fcfcc96 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:sparkles: feat(errors) Small improvements of hooks error rendering

issue #6071
Showing with 5 additions and 3 deletions
+5 -3
...@@ -29,7 +29,7 @@ class SimplePluginHookError extends SimplePluginError ...@@ -29,7 +29,7 @@ class SimplePluginHookError extends SimplePluginError
{ {
$this->hookType = $type; $this->hookType = $type;
parent::__construct($origin, htmlescape($output), $code, $previous); parent::__construct($origin, '<pre><samp>'.htmlescape($output).'</samp></pre>', $code, $previous);
} }
public function toArray (): array public function toArray (): array
...@@ -61,11 +61,13 @@ class SimplePluginHookError extends SimplePluginError ...@@ -61,11 +61,13 @@ class SimplePluginHookError extends SimplePluginError
} else { } else {
$html .= htmlescape($label); $html .= htmlescape($label);
} }
$html .= htmlescape(' > ');
} }
$html .= htmlescape($this->hookType);
$html .= '<br/><br/>'; $html .= '<br/><br/>'."\n";
$html .= htmlescape(sprintf(_('Trigger "%s" returned an error!'), $this->hookType)); $html .= htmlescape(_('Trigger returned an error!'));
$html .= '<br/><br/>'."\n"; $html .= '<br/><br/>'."\n";
$html .= htmlescape(sprintf(_('Exit code: %d'), $this->getCode())).'<br/>'."\n"; $html .= htmlescape(sprintf(_('Exit code: %d'), $this->getCode())).'<br/>'."\n";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment