TypeClass v1.0.0 TypeClass.Property.FailedCheckError exception

Information about a failed property check

Examples

%TypeClass.Property.FailedCheckError{
  message:  "List does not conform to property CoolClass.associative",
  datatype: List,
  property: :associative,
  class:    CoolClass
}

Summary

Functions

Callback implementation for Exception.exception/1

Callback implementation for Exception.message/1

Convenience constructor

Types

t()
t() :: %TypeClass.Property.FailedCheckError{__exception__: term, datatype: module, message: String.t, property: atom, type_class: module}

Functions

exception(msg)
exception(String.t) :: Exception.t
exception(Keyword.t) :: Exception.t

Callback implementation for Exception.exception/1.

message(exception)
message(Exception.t) :: String.t

Callback implementation for Exception.message/1.

new(datatype, class, prop_name)
new(module, module, atom) :: t

Convenience constructor

Examples

iex> TypeClass.Property.FailedCheckError.new(List, CoolClass, :associative)
%TypeClass.Property.FailedCheckError{
  message:  "List does not conform to property CoolClass.associative",
  datatype: List,
  property: :associative,
  class:    CoolClass
}