def process_request(self, session):
		debugger = self.debugger()
		debugger_session_id = debugger.session_id() if debugger is not None else None
		try:
			request = session.read_request()
			if debugger_session_id is not None:
				debugger.request(
					debugger_session_id, request, session.protocol_version(), session.protocol()
				)
			try:
				target_route = self.route_map().route(request, self)
				if debugger_session_id is not None:
					debugger.target_route(debugger_session_id, target_route)
				if target_route is not None:
					response = self.execute(request, target_route)
				else:
					presenter_cls = self.route_map().error_presenter()
					presenter = presenter_cls(request)
					response = presenter.error_code(code=404)
				if debugger_session_id is not None:
					debugger.response(debugger_session_id, response)
			except Exception as e:
				if debugger_session_id is not None:
					debugger.exception(debugger_session_id, e)
				presenter_cls = self.route_map().error_presenter()
				presenter = presenter_cls(request)
				response = presenter.exception_error(e)
			session.write_response(request, response, *response.__pushed_responses__())
		except Exception as e:
			if debugger_session_id is not None:
				debugger.exception(debugger_session_id, e)
			session.session_close()
		if debugger_session_id is not None:
			debugger.finalize(debugger_session_id)