Skip to content

Accept charlist reasons from Erlang error formatters - #16242

Merged
josevalim merged 2 commits into
elixir-lang:mainfrom
lukaszsamson:codex/format-charlist-error-info-reasons
Nov 29, 2026
Merged

josevalim merged 2 commits into
elixir-lang:mainfrom
lukaszsamson:codex/format-charlist-error-info-reasons

Conversation

@lukaszsamson

Copy link
Copy Markdown
Contributor

An EEP 54 formatter can return :reason as Unicode chardata. Normalizing :badarg or :system_limit previously concatenated that value as a binary, so a valid charlist could raise during rescue and replace the original error.

Convert the formatter reason where these two exception messages are built. The regression test supplies a non-ASCII charlist and verifies both messages retain their argument detail. The regression fails before the fix. The exception, raise, and compiler error suites pass (209 tests and doctests).

@josevalim
josevalim merged commit cc844ee into elixir-lang:main Nov 29, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants