class PhusionPassenger::ActiveSupport3Extensions::UnionStationExtension::ExceptionLogger

def call(env)

def call(env)
  @app.call(env)
rescue Exception => e
  log_union_station_exception(env, e) if env[PASSENGER_TXN_ID]
  raise e
end

def initialize(app, union_station_core, app_group_name)

def initialize(app, union_station_core, app_group_name)
  @app = app
  @union_station_core = union_station_core
  @app_group_name = app_group_name
end

def log_union_station_exception(env, exception)

def log_union_station_exception(env, exception)
  options = {}
  request = ActionDispatch::Request.new(env)
  if request.parameters['controller']
    options[:controller_name] = request.parameters['controller'].humanize + "Controller"
    options[:action_name] = request.parameters['action']
  end
  PhusionPassenger.log_request_exception(env, exception, options)
end