修复拦截器抛出异常导致继续向下的BUG

This commit is contained in:
xx
2024-06-06 21:35:00 +08:00
parent 4a6e1b4a2e
commit 0c8ede7ceb

View File

@@ -166,6 +166,7 @@ void ylib::network::http::router::__thread_callback(reqpack* rp)
ylib::log->error("(interceptor)business processing exception:" + std::string(e.what()) + ", url:" + rp->filepath() + " ip:" + rp->request()->remote_ipaddress(true), "router");
#endif
rp->response()->send((std::string)e.what(), 500, "Internal Server Error");
return;
}
bool execed = false;
for(size_t i=0;i<m_subscribe.m_count;i++){