# `Cartouche.Hex.InvalidHex`
[🔗](https://github.com/zenhive/cartouche/blob/main/lib/cartouche/hex.ex#L9)

Raised by `Cartouche.Hex` decode/encode bang functions when input is not
valid hex (wrong length, non-hex characters, missing/extra `0x` prefix, etc.).

Public callers can `rescue Cartouche.Hex.InvalidHex` to handle these.

---

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