Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-1062

ArgumentError should be wrapped in a custom Mongoid error class

    • Type: Icon: Task Task
    • Resolution: Done
    • 2.3.1
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Rescuing ArgumentError is pretty nerve racking in an application at the model or controller level. It should be caught when typecasting dates and a Mongoid wrapped error should be thrown in its place. Perhaps something more descriptive like Mongoid::InvalidDateFormat or even something generic to typecasting failure Mongoid::TypecastFailure

            Assignee:
            Unassigned Unassigned
            Reporter:
            seankibler seankibler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: