anchor.diff:  %% @end
   %%--------------------------------------------------------------------
   -spec report_error(Request :: any(), Type :: request_type(), Error :: term(),
  -    LogLevel :: debug | warning | error) ->
  +    LogLevel :: debug | warning | error, Stacktrace :: term()) ->
       #fuse_response{} | #provider_response{} | #proxyio_response{}.
  -report_error(Request, RequestType, Error, LogLevel) ->
  -    Stacktrace = erlang:get_stacktrace(),
  +report_error(Request, RequestType, Error, LogLevel, Stacktrace) ->
       Status = #status{code = Code, description = Description} =
           fslogic_errors:gen_status_message(Error),
       MsgFormat =
  
positive.code:     end, Evts),
  
      case Ctx of
          #{notify := NotifyFun} -> NotifyFun(#server_message{message_body = #status{code = ?OK}});
          _ -> ok
      end,
  
  
negative.code:                             {error, {Type, Reason0}}
                      end,
                  case fslogic_remote:postrouting(NextCTX, PrePostProcessResponse, UpdatedRequest) of
                      undefined ->
                          throw({unable_to_reroute_message, PrePostProcessResponse});
                      LocalResponse -> LocalResponse
                  end
          end
      catch
          Reason ->
              %% Manually thrown error, normal interrupt case.
              report_error(Request, RequestType, Reason, debug, erlang:get_stacktrace());
          error:{badmatch, Reason} ->
              %% Bad Match assertion - something went wrong, but it could be expected (e.g. file not found assertion).
              report_error(Request, RequestType, Reason, warning, erlang:get_stacktrace());
          error:{case_clause, Reason} ->
              %% Case Clause assertion - something went seriously wrong and we should know about it.
              report_error(Request, RequestType, Reason, error, erlang:get_stacktrace());
          error:Reason ->
              %% Something went horribly wrong. This should not happen.
              report_error(Request, RequestType, Reason, error, erlang:get_stacktrace())
      end.
  
  %%--------------------------------------------------------------------
  