NearestDate.Error exception (nearest_date v0.2.0) View Source

Exception that represents an error in datetime terms.

This exception has a :reason field that can have one of the following values:

  • :not_found - means that no datetime was found which meets the critea defined in the options.

  • {:invalid_date, term} - means that the given term is not a valid datetime format.

Link to this section Summary

Functions

Callback implementation for Exception.message/1.

Link to this section Types

Specs

t() :: %NearestDate.Error{
  __exception__: term(),
  reason: {:invalid_format, any()} | :not_found
}

Link to this section Functions

Callback implementation for Exception.message/1.