package control
Provides functionality relating to Exception handling, validation and control structures.
- Source
- package.scala
- See also
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- control
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
object
Catcher
Provides methods for obtaining default Catchers for possible DateTimeExceptions thrown by the underlying Java API.
Provides methods for obtaining default Catchers for possible DateTimeExceptions thrown by the underlying Java API.
import java.time._ import codes.reactive.scalatime._ import control.Catcher // Obtain a TimeCatcher for all DateTimeExceptions val catchAllLocalDate = Catcher.all(_ => LocalDate.now()) // Use the catcher to recover from a parse error val recovered = Try { LocalDate.parse(")()(@*@%@#%@#%)") } recover catchAllLocalDate
Example:
Scala Time
scala-time is a simple Scala wrapper for easier use JDK 1.8.0 (Java 8) time APIs
Overview
The library is contained in the scalatime package which includes extension methods provided via implicit conversion methods to Scala value classes.
For usage examples see below: