# tmux_error:format_error/2

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/d1b6308440cf9eb8f6647e7ae434bce60e849368/apps/libtmux_erlang/src/tmux_error.erl#L34
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_error-format_error-2/

```
format_error/2
-spec format_error(term(), erlang:stacktrace()) ->
                      #{general => unicode:chardata()}.
```

Return supplemental native error text, or an empty map for an unknown reason.

This is the `c:erl_error:format_error/2` callback. It neither changes the
exception nor catches it on behalf of a caller.

## Examples

```erlang
1> #{general := Text} = tmux_error:format_error({bad_query_limit, -1}, []), ok.
ok
2> unicode:characters_to_binary(Text).
<<"The query limit must be an integer from 0 through 65536.">>
```

## Parameters

- `Argument1` (`term()`)
- `Argument2` (`erlang:stacktrace()`)
