Example #1
0
 /**
  * Format error as a pseudo-element in CSS
  *
  * @param \Exception $error
  *
  * @return string
  */
 protected function createErrorCSS($error)
 {
     $message = str_replace(array("'", "\n"), array("\\'", "\\A"), $error->getfile() . ":\n\n" . $error->getMessage());
     return "body { display: none !important; }\n                html:after {\n                    background: white;\n                    color: black;\n                    content: '{$message}';\n                    display: block !important;\n                    font-family: mono;\n                    padding: 1em;\n                    white-space: pre;\n                }";
 }
Example #2
0
<?php

$x = new Exception();
$x->gettraceasstring(1);
$x->gettraceasstring();
$x->__tostring(1);
$x->gettrace(1);
$x->getline(1);
$x->getfile(1);
$x->getmessage(1);
$x->getcode(1);