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 authored and Grégoire Paris committed Dec 12, 2016
1 parent aea3e98 commit 32b654b
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 @@ -146,6 +146,7 @@ public function transform($code, $text)
$e->getMessage()
), array(
'text' => $text,
'exception' => $e,
));
} catch (Twig_Sandbox_SecurityError $e) {
$this->logger->critical(sprintf(
Expand All @@ -154,6 +155,7 @@ public function transform($code, $text)
$e->getMessage()
), array(
'text' => $text,
'exception' => $e,
));
}

Expand Down

0 comments on commit 32b654b

Please sign in to comment.