Results 1 to 2 of 2
Nov 2, 2005, 14:26 #1
- Join Date
- Feb 2005
- 0 Post(s)
- 0 Thread(s)
How do you handle errors ocurring throughout your application?
I have this example, say a user is trying to view a product that does not exist: The user makes a query to view a product with id = 1 and there is no product in the database with that id. A ActiveRecord::RecordNotFound exception is thrown.
Now what do i do?
Should i have a specific controller which i pass all errors to be taken care of. Or should i handle the error in the current controller and action?
Then it comes to my mind that this is one type of problem which maybe should be handled one way. On the other side, user input in forms that are not valid is one type of error and maybe should be handled in another way?
I just want some thoughts about this, and how you design your app.