Skip to content

Commit

Permalink
TracyBridge: fixes, whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Oct 26, 2014
1 parent efa4de5 commit b1b0f7e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Bridges/Framework/TracyBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ public static function initialize()
if ($e instanceof Latte\CompileException) {
return array(
'tab' => 'Template',
'panel' => '<p>' . (is_file($e->sourceName) ? '<b>File:</b> ' . Helpers::editorLink($e->sourceName, $e->sourceLine) : htmlspecialchars($e->sourceName)) . '</p>'
. ($e->sourceCode ? '<pre>' . BlueScreen::highlightLine(htmlspecialchars($e->sourceCode), $e->sourceLine) . '</pre>' : ''),
'panel' => '<p>'
. (is_file($e->sourceName)
? '<b>File:</b> ' . Helpers::editorLink($e->sourceName, $e->sourceLine)
: htmlspecialchars($e->sourceName))
. '</p>'
. ($e->sourceCode
? '<pre>' . BlueScreen::highlightLine(htmlspecialchars($e->sourceCode), $e->sourceLine) . '</pre>'
: ''),
);
} elseif ($e instanceof Nette\Neon\Exception && preg_match('#line (\d+)#', $e->getMessage(), $m)) {
if ($item = Helpers::findTrace($e->getTrace(), 'Nette\DI\Config\Adapters\NeonAdapter::load')) {
Expand All @@ -45,7 +51,7 @@ public static function initialize()
} elseif ($item = Helpers::findTrace($e->getTrace(), 'Nette\Neon\Decoder::decode')) {
return array(
'tab' => 'NEON',
'panel' => BlueScreen::highlightPhp($item['args'][0], $m[1])
'panel' => BlueScreen::highlightFile($item['args'][0], $m[1])
);
}
}
Expand Down

0 comments on commit b1b0f7e

Please sign in to comment.