mawinkle 6 年之前
父节点
当前提交
32e08f68de
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      server.cpp

+ 4 - 1
server.cpp

@@ -38,8 +38,11 @@ int main(){
 			sock.close();
 			std::cout << "Closed\n";
 		}
-		catch(std::exception& e){
+		catch(const std::exception& e){
 			std::cout << e.what() << std::endl;
 		}
+		catch(...){
+			std::cout << "Unidentified exception" << std::endl;
+		}
 	}
 }