diff --git a/srtcore/api.cpp b/srtcore/api.cpp index 65760da61..fdf1c9d6d 100644 --- a/srtcore/api.cpp +++ b/srtcore/api.cpp @@ -2687,12 +2687,12 @@ int CUDT::epoll_uwait( { return s_UDTUnited.epoll_uwait(eid, fdsSet, fdsSize, msTimeOut); } - catch (CUDTException e) + catch (const CUDTException& e) { s_UDTUnited.setError(new CUDTException(e)); return ERROR; } - catch (std::exception& ee) + catch (const std::exception& ee) { LOGC(mglog.Fatal, log << "epoll_uwait: UNEXPECTED EXCEPTION: " << typeid(ee).name() << ": " << ee.what()); @@ -2709,12 +2709,12 @@ int32_t CUDT::epoll_set( { return s_UDTUnited.epoll_set(eid, flags); } - catch (CUDTException e) + catch (const CUDTException& e) { s_UDTUnited.setError(new CUDTException(e)); return ERROR; } - catch (std::exception& ee) + catch (const std::exception& ee) { LOGC(mglog.Fatal, log << "epoll_set: UNEXPECTED EXCEPTION: " << typeid(ee).name() << ": " << ee.what());