From: Bjoern Sikora Date: Tue, 16 Jul 2013 09:49:26 +0000 (+0200) Subject: Catch generic std::exception as there can be thrown different types in case of differ... X-Git-Tag: v1.1~8 X-Git-Url: http://developer.intra2net.com/git/?p=bpdyndnsd;a=commitdiff_plain;h=b6171a3f35e5d3bbb89f8ccc44b58d2514a2c795 Catch generic std::exception as there can be thrown different types in case of different problems. Anyhow we can't use the content of the state file in case of exception. --- diff --git a/src/serviceholder.cpp b/src/serviceholder.cpp index 7f7968f..e4a484b 100644 --- a/src/serviceholder.cpp +++ b/src/serviceholder.cpp @@ -130,7 +130,7 @@ int Serviceholder::deserialize_services() boost::archive::text_iarchive ia(ifs); ia >> _service_container >> _ip_addr_helper; } - catch( const boost::archive::archive_exception& e ) + catch( const std::exception& e ) { // There is a corrupted object file, continue without recovering old Services' state. Log->print_exception_deserialize(e.what());