diff options
author | Péter Gömöri <peter.gomori@erlang-solutions.com> | 2016-06-06 02:03:15 +0200 |
---|---|---|
committer | Péter Gömöri <peter.gomori@erlang-solutions.com> | 2016-06-06 02:15:58 +0200 |
commit | cc2e5f78764809909d81c8c3fb59627c2d40def2 (patch) | |
tree | e0cceb826050ef22a0e3a5d9350482963ec01bfd /src/rebar_prv_as.erl | |
parent | e1f3473ca35298d2a4fbaaf32ff8e85c8b91c7ca (diff) |
Handle control sequences in formatted errors
Formatted errors can accidentally contain substrings which are control
sequences for io:format/2. This is a naive attempt to handle such cases.
One example is running xref on the following module
(assuming module m does not exist)
```
-module(handle_error).
-export([f/0]).
f() -> m:'bobby~stables'().
```
```
$ rebar3 xref
===> Verifying dependencies...
===> Compiling myapp
===> Running cross reference analysis...
escript: exception error: bad argument
in function io:format/3
called as io:format(<0.23.0>,
"\e[0;31m===> \e[1mWarning: handle_error:f/0 is unused export (Xref)\nWarning: handle_error:f/0 calls undefined function m:bobby~stables/0 (Xref)\n\n\e[0m\e[0m",
[])
in call from rebar3:handle_error/1 (/Users/gomoripeti/git/rebar3/_build/default/lib/rebar/src/rebar3.erl, line 279)
```
Diffstat (limited to 'src/rebar_prv_as.erl')
0 files changed, 0 insertions, 0 deletions