CodeIgniter Forums
Controller/Method to catch any application error and email? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Controller/Method to catch any application error and email? (/showthread.php?tid=29243)



Controller/Method to catch any application error and email? - El Forum - 04-03-2010

[eluser]novice32[/eluser]
Hello, how can I write a controller method to catch, globally, any application errors? In the controller I would capture the error details and email them to a designated email address.

Thanks,
Novice32


Controller/Method to catch any application error and email? - El Forum - 04-03-2010

[eluser]SpooF[/eluser]
All errors go through the error files. So you could redirect from those files to a controller.


Controller/Method to catch any application error and email? - El Forum - 04-03-2010

[eluser]novice32[/eluser]
How would I even start or "redirect from those files"? Can the error class be extended or similar? I prefer the email option (don't want to log into my VPS account daily just to check for errors).