# `Agenda.Infeasible`
[🔗](https://github.com/elixir-tempo/agenda/blob/v0.3.0/lib/agenda/infeasible.ex#L1)

Why a session cannot be held.

Every infeasible result carries reasons, and the struct cannot be
built without them — an empty explanation is a defect, not a
degraded answer. "No arrangement found" tells a user nothing they can
act on; "the Boardroom qualifies but is allocated to the Board
meeting all week" tells them who to ask.

`new/2` builds one, and `message/1` gives the failure as a sentence.

# `t`

```elixir
@type t() :: %Agenda.Infeasible{
  __exception__: term(),
  reasons: [String.t(), ...],
  session: String.t()
}
```

A session that cannot be placed, and why.

# `message`

```elixir
@spec message(t()) :: String.t()
```

The failure as a sentence.

### Arguments

* `infeasible` is a `t:t/0`.

### Returns

* a sentence naming the session and every reason.

### Examples

    iex> reason = Agenda.Infeasible.new("Review", ["no room seats 8", "Alice is away"])
    iex> Agenda.Infeasible.message(reason)
    "Review cannot be held: no room seats 8; Alice is away"

# `new`

```elixir
@spec new(String.t(), [String.t(), ...]) :: t()
```

Build an infeasible result.

### Arguments

* `session` is the session's name.

* `reasons` is a non-empty list of phrases explaining the failure.

### Returns

* a `t:t/0`.

### Examples

    iex> reason = Agenda.Infeasible.new("Review", ["no room seats 8"])
    iex> reason.reasons
    ["no room seats 8"]

---

*Consult [api-reference.md](api-reference.md) for complete listing*
