traces_text.html.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <table class="trace trace-as-text">
  2. <thead class="trace-head">
  3. <tr>
  4. <th class="sf-toggle" data-toggle-selector="#trace-text-<?= $index; ?>" data-toggle-initial="<?= 1 === $index ? 'display' : ''; ?>">
  5. <h3 class="trace-class">
  6. <?php if ($numExceptions > 1) { ?>
  7. <span class="text-muted">[<?= $numExceptions - $index + 1; ?>/<?= $numExceptions; ?>]</span>
  8. <?php } ?>
  9. <?= ($parts = explode('\\', $exception['class'])) ? end($parts) : ''; ?>
  10. <span class="icon icon-close"><?= $this->include('assets/images/icon-minus-square-o.svg'); ?></span>
  11. <span class="icon icon-open"><?= $this->include('assets/images/icon-plus-square-o.svg'); ?></span>
  12. </h3>
  13. </th>
  14. </tr>
  15. </thead>
  16. <tbody id="trace-text-<?= $index; ?>">
  17. <tr>
  18. <td>
  19. <?php if ($exception['trace']) { ?>
  20. <pre class="stacktrace">
  21. <?php
  22. echo $this->escape($exception['class']).":\n";
  23. if ($exception['message']) {
  24. echo $this->escape($exception['message'])."\n";
  25. }
  26. foreach ($exception['trace'] as $trace) {
  27. echo "\n ";
  28. if ($trace['function']) {
  29. echo $this->escape('at '.$trace['class'].$trace['type'].$trace['function']).'('.(isset($trace['args']) ? $this->formatArgsAsText($trace['args']) : '').')';
  30. }
  31. if ($trace['file'] && $trace['line']) {
  32. echo($trace['function'] ? "\n (" : 'at ').strtr(strip_tags($this->formatFile($trace['file'], $trace['line'])), [' at line '.$trace['line'] => '']).':'.$trace['line'].($trace['function'] ? ')' : '');
  33. }
  34. }
  35. ?>
  36. </pre>
  37. <?php } ?>
  38. </td>
  39. </tr>
  40. </tbody>
  41. </table>