elixir-lang/elixir — pull request #1752 by pragdave (2013-10-08 17:44:06+00:00)
Title: Error msgs

This PR removes some of the extraneous lines from elixir and IEx
error reporting. It also changes compilation errors to move the file name/line number to the front. For runtime errors, the exception name
is now shown at the end, giving more prominence to the actual error.

### Before

~~~
iex(1)> 1/0
** (ArithmeticError) bad argument in arithmetic expression
:erlang./(1, 0)
erl_eval.erl:569: :erl_eval.do_apply/6
src/elixir.erl:138: :elixir.eval_forms/3

iex(1)> fred
** (UndefinedFunctionError) undefined function: IEx.Helpers.fred/0
IEx.Helpers.fred()
erl_eval.erl:569: :erl_eval.do_apply/6
src/elixir.erl:138: :elixir.eval_forms/3
~~~

### After

~~~
iex(1)> 1/0
** bad argument in arithmetic expression
:erlang./(1, 0)

iex(1)> fred
** undefined function: fred/0
~~~

### Before

~~~
dave[~] elixir tmp/t.ex
** (SyntaxError) tmp/t.ex:4: "[" starting at line 2 is missing terminator "]". Unexpected token: end
/private/tmp/elixir-SmLr/elixir-0.10.3/lib/elixir/lib/code.ex:290: Code.require_file/2
/private/tmp/elixir-SmLr/elixir-0.10.3/lib/elixir/lib/kernel/cli.ex:308: Kernel.CLI.process_command/2
/private/tmp/elixir-SmLr/elixir-0.10.3/lib/elixir/lib/enum.ex:678: Enum."-map/2-lc$^0/1-0-"/2
/private/tmp/elixir-SmLr/elixir-0.10.3/lib/elixir/lib/kernel/cli.ex:18: Kernel.CLI."-main/1-fun-2-"/1
/private/tmp/elixir-SmLr/elixir-0.10.3/lib/elixir/lib/kernel/cli.ex:39: Kernel.CLI.run/2
:init.start_it/1
~~~

### After

~~~
dave[~] elixir ~/tmp/t.ex
/Users/dave/tmp/t.ex:4: "[" starting at line 2 is missing terminator "]". Unexpected token: end [SyntaxError]
~~~