Skip to content

Commit

Permalink
[core] Catch an exception by reference
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko authored and rndi committed Oct 15, 2019
1 parent 737d47e commit c774cbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions srtcore/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
Expand Down

0 comments on commit c774cbe

Please sign in to comment.