CodeIgniter Forums
CI throws up HTML page for db errors - 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: CI throws up HTML page for db errors (/showthread.php?tid=32017)



CI throws up HTML page for db errors - El Forum - 07-10-2010

[eluser]Unknown[/eluser]
If I have a typo in a SQL query - maybe from generated SQL, maybe from misconfigured customer files, could be anything - CI throws a fit, "Internal Server Error 500", a HTML page detailing the error and stops further execution.

Is there a simple way to catch this error somehow, and deal with in myself?

Because in this case it's an Ajax request and the JavaScript code I have in place that also checks for success/failure can't do anything with it, so instead of showing an error, the script just sits there..