Commit 20f7f071 authored by Pavel Vainerman's avatar Pavel Vainerman

Прошёлся по вылавливаниям исключений. Добавил ловушку для std::exception

parent e7070ce0
......@@ -54,6 +54,10 @@ int main(int argc, const char **argv)
{
dlog[Debug::CRIT] << "(smemory): " << e.what() << endl;
}
catch( std::exception& e )
{
unideb[Debug::CRIT] << "(smemory): " << e.what() << endl;
}
catch(...)
{
dlog[Debug::CRIT] << "(smemory): catch(...)" << endl;
......
......@@ -259,14 +259,14 @@ void UNetReceiver::receive()
if( recv() )
ptRecvTimeout.reset();
}
catch( ost::SockException& e )
{
dlog[Debug::WARN] << myname << "(receive): " << e.getString() << endl;
}
catch( UniSetTypes::Exception& ex)
{
dlog[Debug::WARN] << myname << "(receive): " << ex << std::endl;
}
catch( std::exception& e )
{
dlog[Debug::WARN] << myname << "(receive): " << e.what()<< std::endl;
}
catch(...)
{
dlog[Debug::WARN] << myname << "(receive): catch ..." << std::endl;
......
......@@ -161,6 +161,10 @@ void UNetSender::send()
{
dlog[Debug::WARN] << myname << "(send): " << ex << std::endl;
}
catch( std::exception& e )
{
dlog[Debug::WARN] << myname << "(send): " << e.what() << std::endl;
}
catch(...)
{
dlog[Debug::WARN] << myname << "(send): catch ..." << std::endl;
......
......@@ -289,10 +289,9 @@ int main(int argc, char* argv[])
break;
}
}
catch( ost::SockException& e )
catch( std::exception& e )
{
cerr << "(main): " << e.getString() << " (" << addr << ")" << endl;
return 1;
cerr << "(main): " << e.what() << endl;
}
catch( ... )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment