# File lib/rack/perftools_profiler/profiler_middleware.rb, line 23
    def call(env)
      # I used to clone the env, but it broke any apps that used Warden
      # ex) @env = env.clone
      @env = env
      action = Action.for_env(@env, @profiler, self)
      action.act
      action.response
    rescue ProfilerArgumentError => err
      @env['rack.errors'].write(err.message)
      [400, {'Content-Type' => 'text/plain'}, [err.message]]
    rescue ProfilingError => err
      @env['rack.errors'].write(err.message + "\n" + err.stderr)
      [500, {'Content-Type' => 'text/plain'}, [err.message+"\n\n", "Standard error:\n"+err.stderr+"\n"]]
    end