# `PlaywrightEx.ExpectError`
[🔗](https://github.com/ftes/playwright_ex/blob/v0.17.0-rc.5/lib/playwright_ex/expect_error.ex#L1)

A failed matcher (`PlaywrightEx.Expect`).

Port of JS `ExpectError` (`packages/playwright/src/matchers/matcherHint.ts`). Its fields keep
their JS names:

  * `message` - the matcher's message, as in JS (`matcherResult.message`).
  * `name` - `"Error"`, as in JS.
  * `matcherResult` - the result as in JS: a map with `name`, `message`, `pass`, `expected`,
    `actual`, `log`, `timeout`, `ariaSnapshot` (keys whose JS value is `undefined` are left out),
    and `suggestedRebaseline`: for a test integration that writes inline aria snapshots, the new
    snapshot as a JS template literal (`{indent}` placeholders, JS escapes).
  * `stack` - `""`: Elixir has the stack trace of the raise.

# `t`

```elixir
@type t() :: %PlaywrightEx.ExpectError{
  __exception__: term(),
  matcherResult: map() | nil,
  message: String.t(),
  name: String.t(),
  stack: String.t()
}
```

See the module docs for the fields.

---

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