anchor.diff:  argss(I) ->
       io_lib:fwrite(<<"~w arguments">>, [I]).
   
  -format_stacktrace1(S0, Stack0, PF, SF, Enc, CL, Reason) ->
  +format_stacktrace1(Sep, Stack, PF, SF, Enc, CL, Reason) ->
  +    format_stacktrace1(Sep, Stack, PF, SF, Enc, CL, Reason,
  +                       get_extended_error(Reason, Stack)).
  +format_stacktrace1(S0, Stack0, PF, SF, Enc, CL, Reason, ErrorMap) ->
       Stack1 = lists:dropwhile(fun({M,F,A,_}) -> SF(M, F, A)
                                end, lists:reverse(Stack0)),
       S = ["  " | S0],
       Stack = lists:reverse(Stack1),
  -    format_stacktrace2(S, Stack, 1, PF, Enc, CL, Reason).
  -
  -format_stacktrace2(_S, _Stack, _N, _PF, _Enc, _CL=0, _Reason) ->
  +    format_stacktrace2(S, Stack, 1, PF, Enc, CL, Reason, ErrorMap).
  +
  +format_stacktrace2(_S, _Stack, _N, _PF, _Enc, _CL=0, _Reason, _ErrorMap) ->
       [];
  -format_stacktrace2(S, [{M,F,A,L}|Fs], N, PF, Enc, CL, Reason) when is_integer(A) ->
  -    Cs = io_lib:fwrite(<<"~s~s ~ts ~ts">>,
  +format_stacktrace2(S, [{M,F,A,L}|Fs], N, PF, Enc, CL, Reason, ErrorMap)
  +  when is_integer(A) ->
  +    FormattedError = call_format_error(ErrorMap, A, sep(N, S)),
  +    Cs = io_lib:fwrite(<<"~s~s ~ts ~ts~ts">>,
                          [sep(N, S), origin(N, M, F, A),
                           mfa_to_string(M, F, A, Enc),
  -                        location(L)]),
  +                        location(L), FormattedError]),
       CL1 = sub(CL, Cs, Enc),
  -    [Cs | format_stacktrace2(S, Fs, N + 1, PF, Enc, CL1, Reason)];
  -format_stacktrace2(S, [{M,F,As,_Info}|Fs]=StackTrace, N, PF, Enc, CL, Reason)
  +    [Cs | format_stacktrace2(S, Fs, N + 1, PF, Enc, CL1, Reason, #{})];
  +format_stacktrace2(S, [{M,F,As,_Info}|Fs], N, PF, Enc, CL, Reason, ErrorMap)
     when is_list(As) ->
       A = length(As),
       CalledAs = [S,<<"   called as ">>],
       C = format_call("", CalledAs, {M,F}, As, PF, Enc, CL),
  -    FormattedError = call_format_error(Reason, StackTrace, sep(N, S)),
  +    FormattedError = call_format_error(ErrorMap, As, sep(N, S)),
       Cs = io_lib:fwrite(<<"~s~s ~ts\n~s~ts~ts">>,
                          [sep(N, S), origin(N, M, F, A),
                           mfa_to_string(M, F, A, Enc),
                           CalledAs, C, FormattedError]),
       CL1 = sub(CL, Enc, Cs),
  -    [Cs | format_stacktrace2(S, Fs, N + 1, PF, Enc, CL1, Reason)];
  -format_stacktrace2(_S, [], _N, _PF, _Enc, _CL, _Reason) ->
  +    [Cs | format_stacktrace2(S, Fs, N + 1, PF, Enc, CL1, Reason, #{})];
  +format_stacktrace2(_S, [], _N, _PF, _Enc, _CL, _Reason, _ErrorMap) ->
       "".
   
  -call_format_error(Reason, [{M,_F,As,Info}|_]=StackTrace, Sep) ->
  -    ErrorMap = get_extended_error(Reason, M, Info, StackTrace),
  +call_format_error(ErrorMap, As, Sep) ->
       case format_arg_errors(1, As, ErrorMap) of
           [] ->
               [];
  
positive.code:                       %% Reserve one third for the stacktrace.
                        CharsLimit div 3
                end,
      St = format_stacktrace1(S, Trace, FormatFun, StackFun, Encoding, StLimit, Reason),
      Lim = sub(sub(CharsLimit, exited(Class), latin1), St, Encoding),
      Expl0 = explain_reason(Term, Class, Trace1, FormatFun, S, Encoding, Lim),
      FormatString = case Encoding of
                         latin1 -> "~s~s";
                         _ -> "~s~ts"
  
negative.code:             lists:join([$\n,Sep,<<"   ">>], [""|Errors])
      end.
  
  get_extended_error(Reason, [{M,_F,_As,Info}|_] = StackTrace) ->
      case lists:keyfind(error_info, 1, Info) of
          {error_info,ErrorInfoMap} when is_map(ErrorInfoMap) ->
              FormatModule = maps:get(module, ErrorInfoMap, M),
  