Lets say I want to define some custom exceptions. Where in the Rails directory structure should one put these files?
Thanks,
Steven
| SitePoint Sponsor |
Lets say I want to define some custom exceptions. Where in the Rails directory structure should one put these files?
Thanks,
Steven



Probably in the lib folder. To define a custom exception just do:
Then just include it and you can raise that error.Code:class BlaException < RuntimeError; end
Bookmarks