@@ -260,9 +260,9 @@ discard block |
||
| 260 | 260 | { |
| 261 | 261 | $trace = $this->getTraceSafe(); |
| 262 | 262 | $cause = array('class' => get_class($this), |
| 263 | - 'message' => $this->message, |
|
| 264 | - 'file' => 'unknown', |
|
| 265 | - 'line' => 'unknown'); |
|
| 263 | + 'message' => $this->message, |
|
| 264 | + 'file' => 'unknown', |
|
| 265 | + 'line' => 'unknown'); |
|
| 266 | 266 | if (isset($trace[0])) { |
| 267 | 267 | if (isset($trace[0]['file'])) { |
| 268 | 268 | $cause['file'] = $trace[0]['file']; |
@@ -274,30 +274,30 @@ discard block |
||
| 274 | 274 | $this->cause->getCauseMessage($causes); |
| 275 | 275 | } elseif ($this->cause instanceof Exception) { |
| 276 | 276 | $causes[] = array('class' => get_class($this->cause), |
| 277 | - 'message' => $this->cause->getMessage(), |
|
| 278 | - 'file' => $this->cause->getFile(), |
|
| 279 | - 'line' => $this->cause->getLine()); |
|
| 277 | + 'message' => $this->cause->getMessage(), |
|
| 278 | + 'file' => $this->cause->getFile(), |
|
| 279 | + 'line' => $this->cause->getLine()); |
|
| 280 | 280 | } elseif (class_exists('PEAR_Error') && $this->cause instanceof PEAR_Error) { |
| 281 | 281 | $causes[] = array('class' => get_class($this->cause), |
| 282 | - 'message' => $this->cause->getMessage(), |
|
| 283 | - 'file' => 'unknown', |
|
| 284 | - 'line' => 'unknown'); |
|
| 282 | + 'message' => $this->cause->getMessage(), |
|
| 283 | + 'file' => 'unknown', |
|
| 284 | + 'line' => 'unknown'); |
|
| 285 | 285 | } elseif (is_array($this->cause)) { |
| 286 | 286 | foreach ($this->cause as $cause) { |
| 287 | 287 | if ($cause instanceof PEAR_Exception) { |
| 288 | 288 | $cause->getCauseMessage($causes); |
| 289 | 289 | } elseif ($cause instanceof Exception) { |
| 290 | 290 | $causes[] = array('class' => get_class($cause), |
| 291 | - 'message' => $cause->getMessage(), |
|
| 292 | - 'file' => $cause->getFile(), |
|
| 293 | - 'line' => $cause->getLine()); |
|
| 291 | + 'message' => $cause->getMessage(), |
|
| 292 | + 'file' => $cause->getFile(), |
|
| 293 | + 'line' => $cause->getLine()); |
|
| 294 | 294 | } elseif (class_exists('PEAR_Error') |
| 295 | 295 | && $cause instanceof PEAR_Error |
| 296 | 296 | ) { |
| 297 | 297 | $causes[] = array('class' => get_class($cause), |
| 298 | - 'message' => $cause->getMessage(), |
|
| 299 | - 'file' => 'unknown', |
|
| 300 | - 'line' => 'unknown'); |
|
| 298 | + 'message' => $cause->getMessage(), |
|
| 299 | + 'file' => 'unknown', |
|
| 300 | + 'line' => 'unknown'); |
|
| 301 | 301 | } elseif (is_array($cause) && isset($cause['message'])) { |
| 302 | 302 | // PEAR_ErrorStack warning |
| 303 | 303 | $causes[] = array( |
@@ -383,20 +383,20 @@ discard block |
||
| 383 | 383 | $html = '<table style="border: 1px" cellspacing="0">' . "\n"; |
| 384 | 384 | foreach ($causes as $i => $cause) { |
| 385 | 385 | $html .= '<tr><td colspan="3" style="background: #ff9999">' |
| 386 | - . str_repeat('-', $i) . ' <b>' . $cause['class'] . '</b>: ' |
|
| 387 | - . htmlspecialchars($cause['message']) |
|
| 386 | + . str_repeat('-', $i) . ' <b>' . $cause['class'] . '</b>: ' |
|
| 387 | + . htmlspecialchars($cause['message']) |
|
| 388 | 388 | . ' in <b>' . $cause['file'] . '</b> ' |
| 389 | - . 'on line <b>' . $cause['line'] . '</b>' |
|
| 390 | - . "</td></tr>\n"; |
|
| 389 | + . 'on line <b>' . $cause['line'] . '</b>' |
|
| 390 | + . "</td></tr>\n"; |
|
| 391 | 391 | } |
| 392 | 392 | $html .= '<tr><td colspan="3" style="background-color: #aaaaaa; text-align: center; font-weight: bold;">Exception trace</td></tr>' . "\n" |
| 393 | - . '<tr><td style="text-align: center; background: #cccccc; width:20px; font-weight: bold;">#</td>' |
|
| 394 | - . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Function</td>' |
|
| 395 | - . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Location</td></tr>' . "\n"; |
|
| 393 | + . '<tr><td style="text-align: center; background: #cccccc; width:20px; font-weight: bold;">#</td>' |
|
| 394 | + . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Function</td>' |
|
| 395 | + . '<td style="text-align: center; background: #cccccc; font-weight: bold;">Location</td></tr>' . "\n"; |
|
| 396 | 396 | |
| 397 | 397 | foreach ($trace as $k => $v) { |
| 398 | 398 | $html .= '<tr><td style="text-align: center;">' . $k . '</td>' |
| 399 | - . '<td>'; |
|
| 399 | + . '<td>'; |
|
| 400 | 400 | if (!empty($v['class'])) { |
| 401 | 401 | $html .= $v['class'] . $v['type']; |
| 402 | 402 | } |
@@ -425,15 +425,15 @@ discard block |
||
| 425 | 425 | } |
| 426 | 426 | } |
| 427 | 427 | $html .= '(' . implode(', ', $args) . ')' |
| 428 | - . '</td>' |
|
| 429 | - . '<td>' . (isset($v['file']) ? $v['file'] : 'unknown') |
|
| 430 | - . ':' . (isset($v['line']) ? $v['line'] : 'unknown') |
|
| 431 | - . '</td></tr>' . "\n"; |
|
| 428 | + . '</td>' |
|
| 429 | + . '<td>' . (isset($v['file']) ? $v['file'] : 'unknown') |
|
| 430 | + . ':' . (isset($v['line']) ? $v['line'] : 'unknown') |
|
| 431 | + . '</td></tr>' . "\n"; |
|
| 432 | 432 | } |
| 433 | 433 | $html .= '<tr><td style="text-align: center;">' . ($k+1) . '</td>' |
| 434 | - . '<td>{main}</td>' |
|
| 435 | - . '<td> </td></tr>' . "\n" |
|
| 436 | - . '</table>'; |
|
| 434 | + . '<td>{main}</td>' |
|
| 435 | + . '<td> </td></tr>' . "\n" |
|
| 436 | + . '</table>'; |
|
| 437 | 437 | return $html; |
| 438 | 438 | } |
| 439 | 439 | |
@@ -449,8 +449,8 @@ discard block |
||
| 449 | 449 | $causeMsg = ''; |
| 450 | 450 | foreach ($causes as $i => $cause) { |
| 451 | 451 | $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': ' |
| 452 | - . $cause['message'] . ' in ' . $cause['file'] |
|
| 453 | - . ' on line ' . $cause['line'] . "\n"; |
|
| 452 | + . $cause['message'] . ' in ' . $cause['file'] |
|
| 453 | + . ' on line ' . $cause['line'] . "\n"; |
|
| 454 | 454 | } |
| 455 | 455 | return $causeMsg . $this->getTraceAsString(); |
| 456 | 456 | } |