summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Pettersson <mikpelinux@gmail.com>2020-09-12 18:31:49 +0200
committerMikael Pettersson <mikpelinux@gmail.com>2020-09-12 18:38:28 +0200
commit9f48ebbc0454cf60f9a9808802f755c7d42f9549 (patch)
treebd214a24cc6fd0d62eb541e745cde67fdb45a2cf
parent0d67f92d35af61a7a8da504bdd9e2212ac9315ad (diff)
downloaderlang-9f48ebbc0454cf60f9a9808802f755c7d42f9549.tar.gz
escript: direct all io:put_chars/1 calls to standard_error
they are all error or warning messages
-rw-r--r--lib/stdlib/src/escript.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/src/escript.erl b/lib/stdlib/src/escript.erl
index 50f774c5fc..6d7793a8cd 100644
--- a/lib/stdlib/src/escript.erl
+++ b/lib/stdlib/src/escript.erl
@@ -814,7 +814,7 @@ report_warnings(Ws0) ->
({F,Eds}) -> format_message(F, Eds) end,
Ws0),
Ws = ordsets:from_list(Ws1),
- lists:foreach(fun({_,Str}) -> io:put_chars(Str) end, Ws).
+ lists:foreach(fun({_,Str}) -> io:put_chars(standard_error, Str) end, Ws).
format_message(F, [{Line,Mod,E}|Es]) ->
M = {{F,Line},io_lib:format("~ts:~w: Warning: ~ts\n", [F,Line,Mod:format_error(E)])},
@@ -897,7 +897,7 @@ encoding() ->
put_chars(String) ->
try
- io:put_chars(String)
+ io:put_chars(standard_error, String)
catch
_:_ ->
erlang:display(lists:flatten(String))