Skip to content

fix(beam): normalize exception messages and string split separators - #5053

Merged
dbrattli merged 2 commits into
mainfrom
fix/beam-exception-message
Oct 10, 2026
Merged

dbrattli merged 2 commits into
mainfrom
fix/beam-exception-message

Conversation

@dbrattli

Copy link
Copy Markdown
Collaborator

BEAM custom exceptions with numeric or union payloads expose Message as a raw Erlang value. String consumers and AggregateException formatting then fail with badarg. Route System.Exception.Message through a binary-producing runtime helper while preserving the original payload fields and existing string messages.

The string-consumer regressions also expose inconsistent String.Split separator normalization. A separate commit normalizes character and string separator arrays for plain, remove-empty, and count-limited splits.

Validation:

  • ./build.sh test beam --force-fable-library: 2,736 .NET and 2,788 BEAM tests passed, including entry-point and compiler-diagnostic checks.
  • Four exception regressions pass on .NET and reproduce badarg on the original BEAM runtime; three separator scenarios also reproduce badarg before the fix.
  • Compiler formatting and git diff --check passed.

@dbrattli
dbrattli merged commit f13a9e1 into main Oct 10, 2026
43 checks passed
@dbrattli
dbrattli deleted the fix/beam-exception-message branch October 10, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant