- Warning 1551: Function may throw exception '...' in destructor 'NetworkInterfaceList::~NetworkInterfaceList(void)';
- Info 1775: catch block does not catch any declared exception.
*/
NetworkInterfaceList::~NetworkInterfaceList()
{
- if ( initialized() )
+ try {
+ if ( initialized() )
+ {
+ destroy_list();
+ }
+ }
+ catch ( ... )
{
- destroy_list();
+ GlobalLogger.error() << "Error: could not destroy network interface list."
+ << endl;
}
} //lint !e1579
{
BOOST_ASSERT( IfaFirst != NULL );
- try {
- // The freeifaddrs() must release the linked list allocated by getifaddrs()
- freeifaddrs( IfaFirst );
- IfaFirst = NULL;
- }
- catch ( ... )
- {
- GlobalLogger.error() << "Error: could not destroy network interface list."
- << endl;
- }
+ // The freeifaddrs() must release the linked list allocated by getifaddrs()
+ freeifaddrs( IfaFirst );
+ IfaFirst = NULL;
}