27 protected $htmlMessage;
29 public function __construct (
string $htmlMessage =
'',
int $code = 0, Throwable $previous = NULL)
31 $this->htmlMessage = $htmlMessage;
32 parent::__construct(
htmlunescape(strip_tags($htmlMessage)), $code, $previous);
35 public function getHtmlMessage ()
37 return $this->htmlMessage;
40 public function toArray (): array
43 'message' => $this->getMessage(),
44 'line' => $this->getLine(),
45 'file' => $this->getFile(),
50 public function display ()
52 restore_error_handler();
53 error_reporting(E_ALL);
67 <title>'.htmlescape(_(
'FusionDirectory Fatal Error')).
'</title> 71 '<table style="width:100%; border:2px solid red;"> 73 <td style="vertical-align:top;padding:10px"> 74 <img src="geticon.php?context=status&icon=dialog-error&size=32" alt="'.htmlescape(_(
'Error')).
'"/> 76 <td style="width:100%"> 78 '.$this->getHtmlMessage().
' 83 if (isset($config) && is_object($config) &&
84 $config->get_cfg_value(
'displayerrors') ==
'TRUE') {
85 $trace = FusionDirectoryError::formatTrace($this);
86 $display .= print_a($trace, TRUE);
89 $display .=
'</body></html>';
htmlescape(string $str)
Escape string for HTML output.
Fatal error class. Does not extend FusionDirectoryError.
htmlunescape(string $html)
Unescape string for HTML output, reverse of htmlescape.
renderFatalErrorDialog()
Render fatal error screen.