Skip to content

Commit

Permalink
typer: Fix a bug
Browse files Browse the repository at this point in the history
Instead of outputting a formatted message showing errors found, a core
was (often) created.
  • Loading branch information
uabboli committed Sep 28, 2015
1 parent 7fb90f2 commit ba531a1
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/typer/src/typer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1012,15 +1012,7 @@ compile_error(Reason) ->
-spec msg(string()) -> 'ok'.

msg(Msg) ->
case os:type() of
{unix, _} -> % Output a message on 'stderr', if possible
P = open_port({fd, 0, 2}, [out]),
port_command(P, Msg),
true = port_close(P),
ok;
_ -> % win32
io:format("~s", [Msg])
end.
io:format(standard_error, "~s", [Msg]).

%%--------------------------------------------------------------------
%% Version and help messages.
Expand Down

0 comments on commit ba531a1

Please sign in to comment.