Reputation: 5208
i am working on an website on kohana 3.0.12 and i have installed a module that loggs me some errors. All works fine, except that, when i want to effectively log an error, i get an error and i don;t know how to manage it.
Here is the messy code:
public static function handler(Exception $e)
{
// It's a nice time to log :)
Kohana::$log->add(Kohana::ERROR, Kohana_Exception::text($e));
etc code here
well that Kohana_Exception::text($e) causes an exception like: Call to undefined method Kohana_Exception::text() ? i guess it is a framework bug. any idea of how i can solve the problem? (i guess i should use another instance but Kohana_Exception:: but what instance?) thank you
Upvotes: 0
Views: 520
Reputation: 1895
I belive the exception handling in 3.0 is located in the Kohana class. Try Kohana::exception(), or look in api guide if that isn't it.
Upvotes: 0
Reputation: 17725
You get this error because neither Kohana_Exception
nor Exception
classes don't have text()
method. I think the author of the module wanted to write like this:
Kohana::$log->add(Kohana::ERROR, Kohana::exception_text($e));
Upvotes: 1