exception-writer
By: fruffl | Date: Jan 15 2010 13:50 | Format: PHP | Expires: never | Size: 3.33 KB | Hits: 998
- <?php
- ABSTRACT CLASS ILLI_Exception EXTENDS EXCEPTION
- {
- /**
- * display error-messages
- *
- * @final
- * @static
- * @param array $e the exception
- * @param bool $exit die() on exception-end
- */
- final public static function w($e, $exit = true)
- {
- $fire_b = '<div style="background: #eee; color: #333; font-size: 11px;
- font-family: monospace; padding: 20px;
- border-bottom: 1px solid maroon;">%1$s</div>';
- $fire_i = '<div style="color: #333; font-size: 11px; font-family: monospace;
- padding: 10px; border: 1px solid #ddd; padding: 20px;
- background: #f1f1f1; border-bottom: 1px solid maroon;">%1$s</div>';
- $fire_h = '<h1 style="color: maroon; font-size: 28px;
- font-weight: normal; font-family: Georgia,serif;">%1$s</h1>';
- $fire_l = '<div><strong>%1$s:</strong></div><div style="padding-left: 50px;
- padding-bottom: 5px;">%2$s<br /></div>';
- $fire_c = '<pre style="border: 1px solid #ddd;
- padding: 20px; background: #f1f1f1;">%1$s</pre>';
- foreach(($r = $e->getTrace()) as $b)
- {
- $_t = '';
- foreach($b as $k => $v)
- if($k != 'args')
- {
- }
- else
- {
- $_a = '';
- foreach($b['args'] as $s => $a)
- foreach($a as $c => $b)
- {
- echo '<pre>';
- echo '</pre>';
- }
- }
- }
- {
- $c = "";
- $l = $r[0]['line'];
- $c .= ($l) .": ".
- '<span style="color: maroon; font-weight: normal;">'.
- }
- );
- dirname(dirname(__FILE__))), '/\').DIRECTORY_SEPARATOR);
- $l = array(NULL);
- echo str_replace($p, $l, $r);
- if($exit)
- die();
- }
- }
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago