Permalink
Browse files

When loading views with Markdown, render the exception if loading the…

… view fails. Required for guide/kohana/errors
  • Loading branch information...
1 parent fa525c5 commit 7e60f6da7010d219367d11167ffceb27712549f2 @shadowhand shadowhand committed Dec 30, 2010
Showing with 8 additions and 1 deletion.
  1. +8 −1 classes/kohana/kodoc/markdown.php
View
9 classes/kohana/kodoc/markdown.php
@@ -146,6 +146,8 @@ public function doIncludeViews($text)
{
$replace = array();
+ $replace = array();
+
foreach ($matches as $set)
{
list($search, $view) = $set;
@@ -156,7 +158,12 @@ public function doIncludeViews($text)
}
catch (Exception $e)
{
- // Ignore curly braces when view file is not found
+ ob_start();
+
+ // Capture the exception handler output and insert it instead
+ Kohana::exception_handler($e);
+
+ $replace[$search] = ob_get_clean();
}
}

0 comments on commit 7e60f6d

Please sign in to comment.