Welcome Guest, Not a member yet? Register   Sign In
Error Handling
#1

Hi to all developers...
In CI documentation, I've read what I must do for error handling when finishing app development. And also I've design a custom 404 error page for a better and user friendly view.

My question is: In final product, the users should not see PHP or Databases errors... but what about general errors? How could I handle those and create a better custom page for them?

suppose some users enter some disallowed characters in address bar, or a form CSRF time finished or something like these, then the users a bad error page with some messages like these:

An Error Was Encountered
The URI you submitted has disallowed characters.

thanks a lot.
Reply
#2

In Codeigniter 3.X you have extra folder in views called "errors", you can all type of errors view from there to make it user friendly
Reply
#3

(08-25-2016, 10:14 AM)mubbi.qureshi Wrote: In Codeigniter 3.X you have extra folder in views called "errors", you can all type of errors view from there to make it user friendly

Thanks. But I know about these folders too!

I mean, for 404 error page, I could create a controller and a method, and route to this method via $route['404_override']. In this way, I could have a page like other pages, with their theme, but for errors. How could these about general errors?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB