catch prev. uncaught exception, coverity issue 1121925
This commit is contained in:
parent
648eed6532
commit
289e5ada2c
@ -51,8 +51,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
int main( const int argc, const char * argv[] ) {
|
int main( const int argc, const char * argv[] ) {
|
||||||
SharedBarriers barrier;
|
|
||||||
|
|
||||||
|
LogPolicy::GetInstance().Unmute();
|
||||||
|
SharedBarriers barrier;
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if( -1 == mlockall(MCL_CURRENT | MCL_FUTURE) ) {
|
if( -1 == mlockall(MCL_CURRENT | MCL_FUTURE) ) {
|
||||||
@ -62,15 +63,19 @@ int main( const int argc, const char * argv[] ) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
boost::interprocess::scoped_lock<
|
try {
|
||||||
boost::interprocess::named_mutex
|
boost::interprocess::scoped_lock<
|
||||||
> pending_lock(barrier.pending_update_mutex);
|
boost::interprocess::named_mutex
|
||||||
} catch(...) {
|
> pending_lock(barrier.pending_update_mutex);
|
||||||
// hard unlock in case of any exception.
|
} catch(...) {
|
||||||
barrier.pending_update_mutex.unlock();
|
// hard unlock in case of any exception.
|
||||||
|
barrier.pending_update_mutex.unlock();
|
||||||
|
}
|
||||||
|
} catch(const std::exception & e) {
|
||||||
|
SimpleLogger().Write(logWARNING) << "[exception] " << e.what();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
LogPolicy::GetInstance().Unmute();
|
|
||||||
SimpleLogger().Write(logDEBUG) << "Checking input parameters";
|
SimpleLogger().Write(logDEBUG) << "Checking input parameters";
|
||||||
|
|
||||||
bool use_shared_memory = false;
|
bool use_shared_memory = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user