modifying exceptions to use kohanas error handler
This commit is contained in:
parent
51b0442dbb
commit
706b94e9ad
|
@ -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 '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue