Scala 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
- DateTimeParseExceptionCheck a delivery date entered on a form
- Option.getOrElsePrint a label when the phone number is missing
- PatternSyntaxExceptionValidate a saved product search
- StringOps.toIntOptionReject a mistyped order quantity
- Type pattern matchingCheck the type of an imported fare
- requireReject an empty ticket order
State and collections
- ConcurrentModificationExceptionRemove an expired pass during inspection
- Queue.dequeueOptionCall the next person at the clinic
- Seq.liftFind a seat after the coach changes
- Vector.appendedAdd a stop to a published bus route
Files and streams
- EOFExceptionRead a stock count from a short record
- FileAlreadyExistsExceptionSave a report without replacing the first copy
- IOException on a closed readerRead from a finished receipt import
- NoSuchFileExceptionRecover when a receipt is missing
Jobs and runtime
- CancellationExceptionCollect a cancelled print job
- ClassNotFoundExceptionLoad an optional invoice exporter
- ExecutionExceptionFind the reason a background import failed
- InterruptedExceptionStop waiting when a shift ends
- TimeoutExceptionLimit the wait for a shipping quote