Ruby errors and exceptions
Handle invalid entries, missing records, and interrupted work. Follow each failure from the input that triggers it to a response the user can act on.
Input and validation
- Date.iso8601 and ArgumentErrorCheck a delivery date entered on a form
- Integer with exception: falseReject a mistyped order quantity
- RegexpErrorValidate a saved product search
- String#length before slicingRead the depot prefix on a damaged label
- nil? guardPrint a label when the phone number is missing
State and collections
- Array#fetch and IndexErrorFind a seat after the coach changes
- FrozenErrorAdd a stop to a published bus route
- ZeroDivisionErrorSplit an equipment fee across a class