modifying exceptions to use kohanas error handler

This commit is contained in:
Jeremy Bush 2010-07-13 13:19:47 -05:00
parent 51b0442dbb
commit 706b94e9ad

View file

@ -119,4 +119,22 @@ class Kostache extends Mustache
return $this;
}
/**
* Overriding __toString to use Kohana's exception handler
*
* @return string
*/
public function __toString()
{
try
{
$result = $this->render();
return $result;
}
catch (Exception $e) {
Kohana::exception_handler($e);
return '';
}
}
}