# `VerifiedPubSub.TopicError`
[🔗](https://github.com/CuriousCurmudgeon/verified_pubsub/blob/v0.1.0/lib/verified_pubsub/topic_error.ex#L1)

The error for a param value that cannot safely fill its segment of the wire topic.

A param value fills exactly one segment of the topic. A value that is empty, or that
contains the separator, can build a wire topic other than the one that the call site
names. That wire topic can belong to another declared topic. The message then goes to
the wrong subscribers. See `VerifiedPubSub.Topic`.

# `reason`

```elixir
@type reason() :: :empty | :separator
```

The reason that a param value cannot fill its segment:

  * `:empty`: the value is empty.
  * `:separator`: the value contains the separator.

# `t`

```elixir
@type t() :: %VerifiedPubSub.TopicError{
  __exception__: term(),
  manifest: module(),
  param: atom(),
  reason: reason(),
  segments: [VerifiedPubSub.Dsl.Topic.segment()],
  topic: atom(),
  value: term()
}
```

The fields of the error:

  * `manifest`: the manifest that declares the topic.
  * `topic`: the name of the topic.
  * `segments`: the segments of the topic.
  * `param`: the param that the value fills.
  * `value`: the value that the call site passes.
  * `reason`: why the value cannot fill its segment.

---

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