anchor.diff:      Msg = io_lib:format("::"++Fmt, Args),    % gets indentation right
       io_lib:fwrite("*** ~s ***\n~s\n\n", [Title, Msg]).
   
  +-ifdef(TEST).
  +format_exception_test_() ->
  +    [?_assertMatch(
  +        "error:dummy"++_,
  +        lists:flatten(
  +          format_exception(try erlang:error(dummy)
  +                           catch C:R -> {C, R, erlang:get_stacktrace()}
  +                           end))),
  +     ?_assertMatch(
  +        "error:dummy"++_,
  +        lists:flatten(
  +          format_exception(try erlang:error(dummy, [a])
  +                           catch C:R -> {C, R, erlang:get_stacktrace()}
  +                           end)))].
  +-endif.
   
   %% ---------------------------------------------------------------------
   %% Deep list iterator; accepts improper lists/sublists, and also accepts
  
positive.code: format_stacktrace(Trace) ->
      format_stacktrace(Trace, "in function", "in call from").
  
  format_stacktrace([{M,F,A}|Fs], Pre, Pre1) when is_integer(A) ->
      [io_lib:fwrite("  ~s ~w:~w/~w\n", [Pre, M, F, A])
       | format_stacktrace(Fs, Pre1, Pre1)];
  format_stacktrace([{M,F,As}|Fs], Pre, Pre1) when is_list(As) ->
      A = length(As),
      C = case is_op(M,F,A) of
  	    true when A =:= 1 ->
  
negative.code: 	    false ->
  		io_lib:fwrite("~w(~s)", [F,format_arglist(As)])
  	end,
      [io_lib:fwrite("  ~s ~w:~w/~w~s\n    called as ~s\n",
  		   [Pre,M,F,A,format_stacktrace_location(L),C])
       | format_stacktrace(Fs,Pre1,Pre1)];
  format_stacktrace([{M,F,As}|Fs], Pre, Pre1) ->
      format_stacktrace([{M,F,As,[]}|Fs], Pre, Pre1);
  format_stacktrace([],_Pre,_Pre1) ->
      "".
  
  format_stacktrace_location(Location) ->
      File = proplists:get_value(file, Location),
      Line = proplists:get_value(line, Location),
      if File =/= undefined, Line =/= undefined ->
              io_lib:format(" (~s, line ~w)", [File, Line]);
         true ->
              ""
      end.
  
  format_arg(A) ->
      io_lib:format("~P",[A,15]).
  