# `PB.SchemaError`
[🔗](https://github.com/hansihe/pb_ex/blob/v0.2.0/pb/lib/pb/schema_error.ex#L1)

Schema-resolution and introspection failure.

Raised or returned when a name cannot be resolved in the supplied schema, or
a schema-level invariant is violated. See `PB.Error` for the full error model.

`PB.compile/2` raises it with `kind: :missing_imports` for a descriptor set
without some of the files its files import; `:reason` then lists each
importing file with the imports it lacks, as `[{file, [import]}]`.

# `kind`

```elixir
@type kind() ::
  :unknown_message
  | :unknown_enum
  | :unknown_service
  | :unknown_extension
  | :unsupported_edition
  | :invalid_schema
  | :missing_imports
```

Which schema-resolution failure this is.

# `t`

```elixir
@type t() :: %PB.SchemaError{
  __exception__: term(),
  kind: kind() | nil,
  message_name: atom() | nil,
  name: term(),
  operation: PB.Error.operation() | nil,
  path: [PB.Error.path_element()],
  reason: term(),
  type_name: atom() | nil
}
```

---

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