You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exception.message/1 on exception returns ANSI codes #384
After #383 i tried it again in our codebase. Claude created this summary of the issue. I verified the reproduction.
VM error structs and CompilerException bake their fully-formatted (andANSI-colored) text into :message at construction time. Since that happens during VM execution — where IO.ANSI.enabled?/0 is true — the escape codes and multi-line render survive into non-TTY sinks: log files, containerstdout, Sentry/AppSignal titles. The formatter's TTY gate never fires at the point output is actually written.
compiler_exception.ex:16-18 — exception/1 stores Util.format_error/1 output as strings in :errors, so parse_chunk/1's exception carries pre-rendered text too.
Freezing a TTY-dependent render at build time defeats the gate.
Expectations
No newlines and ANSI codes in an exception message, to cleanly log the errors in our log system
Activity
kevinschweikert commentedon Jul 13, 2026
For a nice log i currently have to do:
docs(errors): changelog the lazy-render ANSI fix; harden clean_message
docs(changelog): fold error-format changes into 1.0.0