0

Trying to extend codeigniters CI_Exceptions class so i can override the show_404 method but I just get fatal with the following message:

" Fatal error: Class 'CI_Exceptions' not found "

The contents of MY_Exceptions is as follows:

class MY_Exceptions extends CI_Exceptions {

    function MY_Exceptions()
    {
        die("reached MY_Exceptions!!");
        //parent::CI_Exceptions();
    }
}

The file is located in app/libraries.

I am using codeigniter version 2.0.2

I am using the exact same method to override the core Controller which is working perfectly.

David
  • 3
  • 1
  • 2

1 Answers1

2

Exceptions class has been moved to core classes. If you want to modify it you need to put it in application/core/. Please check here for more details.

Tapos
  • 601
  • 4
  • 8
  • Thank you!! worked perfectly. What version did this occur? For future reference, how would I have been able to tell this by the code? – David May 22 '11 at 15:39
  • Cant remember in which version this has been changed. To get the version-wise changes, you can check [changelogs](http://codeigniter.com/user_guide/changelog.html). Also you can have an eye in codeigniter community to get updates. – Tapos May 22 '11 at 15:55