0

How to use custom error pages for 500 error in kohana 3.3. I have tried using the custom error pages for 404 error and its working. I have just refered kohana official site but i have no idea how to handle 500 error. It will be really helpful if someone help on this. Thank in advance.

Manigandan Arjunan
  • 2,260
  • 1
  • 25
  • 42

1 Answers1

2

You must override HTTP_Exception_500 class

class HTTP_Exception_500 extends Kohana_HTTP_Exception_500 {

    public function get_response()
    {
        //your code like in official guide by 404 page
    }
}

path of class - APPPATH/classes/HTTP/Exception/500.php

  • Yes, it works for 404, for example. But if I want to do a redirect inside, how should I do ? HTTP::redirect('...',302); > return me an error... "Kohana_HTTP_Exception [ 302 ]:" and no message. – emilie zawadzki Jun 13 '13 at 15:57