Packages

Define configurations using environment variables.

Current section

Files

Jump to
cony lib cony undefined_variable_error.ex
Raw

lib/cony/undefined_variable_error.ex

defmodule Cony.UndefinedVariableError do
defexception [:key]
@type t :: %__MODULE__{key: Cony.variable_key}
@spec exception(Cony.variable_key) :: Exception.t
def exception(key), do: %__MODULE__{key: key}
@spec message(t) :: String.t
def message(%__MODULE__{key: key}) do
"Environment variable has not been defined :#{key}"
end
end