With EEP 54 (part of Erlang/OTP 24+), we can now get extra
information from Erlang errors. Before this patch:
Interactive Elixir (1.12.0-dev)
iex(1)> ets = :ets.new(:example, [])
#Reference<0.3845811859.2669281281.223553>
iex(2)> :ets.delete(ets)
true
iex(3)> :ets.insert(ets, :should_be_a_tuple)
** (ArgumentError) argument error
(stdlib 3.15) :ets.insert(#Reference<0.3845811859.2669281281.223553>, :should_be_a_tuple)
After this patch:
Interactive Elixir (1.12.0-dev)
iex(1)> ets = :ets.new(:example, [])
#Reference<0.105641012.1058144260.76455>
iex(2)> :ets.delete(ets)
true
iex(3)> :ets.insert(ets, :should_be_a_tuple)
** (ArgumentError) errors were found at the given arguments:
* 1st argument: the table identifier does not refer to an existing ETS table
* 2nd argument: not a tuple
(stdlib 3.15) :ets.insert(#Reference<0.105641012.1058144260.76455>, :should_be_a_tuple)
We choose to always track error info, instead of moving this
to blame, because it should be relatively cheap and it is
essential, especially when debugging live systems.
On OTP 24:
iex> <<x::float-16>> = <<60, 0>>
iex> x
1.0
iex> <<x::float-16>>
<<60, 0>>
Before OTP 24 we'd get errors or wouldn't match:
iex> <<1.0::float-16>>
** (ArgumentError) argument error while evaluating iex at line 1
<<x::float-16>> = <<60, 0>>
** (MatchError) no match of right hand side value: <<60, 0>>
iex> (fn <<x::float-16>> -> x; _ -> :nomatch end).(<<60, 0>>)
:nomatch
* Add ISO format examples to the top-level moduledocs.
* Move unit tests out of parse_time/1 documentation and into suite.
* Move unit tests out of parse_naive_datetime/1 documentation and into suite.
* Move unit tests out of parse_utc_datetime/1 documentation and into suite.
* Remove duplicated parse_date/1 doctests, fix missing asserts, other
cleanup.