DataSchema.Errors (data_schema v0.2.0) View Source

When we create a struct we either return the struct we were creating or we return this error. The error/errors that happened during struct creation are collected into this struct

Link to this section Summary

Types

t()

An error is the struct key that caused the error and either an error message or a DataSchema.Errors struct in the case of nested error.

Functions

Adds an error to the given errors struct. The error is prepended to the list of current errors.

Link to this section Types

Specs

t() :: %DataSchema.Errors{errors: [{atom(), String.t() | t()}]}

An error is the struct key that caused the error and either an error message or a DataSchema.Errors struct in the case of nested error.

Link to this section Functions

Link to this function

add_error(errors, error)

View Source

Adds an error to the given errors struct. The error is prepended to the list of current errors.