Mailglass.MigrationVersionError exception (Mailglass v2.5.0)

Copy Markdown View Source

Raised when migration version metadata cannot be trusted.

A missing package anchor is the only catalog state that represents version zero. Query failures and malformed metadata stop migration control flow so a caller cannot mistake an unavailable or corrupt database for a fresh install.

Summary

Types

reason()

@type reason() ::
  :query_failed
  | :missing_comment
  | :invalid_comment
  | :unexpected_result
  | :out_of_range

t()

@type t() :: %Mailglass.MigrationVersionError{
  __exception__: true,
  cause: term(),
  message: String.t(),
  package: :mailglass | :mailglass_inbound,
  prefix: String.t(),
  reason: reason()
}

Functions

new(reason, opts)

@spec new(
  reason(),
  keyword()
) :: t()