Skip to content

Commit

Permalink
Provide the special exception context key
Browse files Browse the repository at this point in the history
This can be used by tools like Sentry to display a nice stack trace.
  • Loading branch information
greg0ire committed Dec 10, 2016
1 parent 1b2dae7 commit bd3340f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Formatter/Pool.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public function transform($code, $text)
$e->getMessage()
), array(
'text' => $text,
'exception' => $e
));
} catch (Twig_Sandbox_SecurityError $e) {
$this->logger->critical(sprintf(
Expand All @@ -150,6 +151,7 @@ public function transform($code, $text)
$e->getMessage()
), array(
'text' => $text,
'exception' => $e
));
}

Expand Down

0 comments on commit bd3340f

Please sign in to comment.