fail gracefully when lock file is not present

This commit is contained in:
Dennis Luxen 2013-10-08 16:25:02 +02:00
parent aaec0e641b
commit a7449c913c

View File

@ -132,9 +132,15 @@ public:
static bool RegionExists( static bool RegionExists(
const IdentifierT id const IdentifierT id
) { ) {
OSRMLockFile lock_file; bool result = true;
boost::interprocess::xsi_key key( lock_file().string().c_str(), id ); try {
return RegionExists(key); OSRMLockFile lock_file;
boost::interprocess::xsi_key key( lock_file().string().c_str(), id );
result = RegionExists(key);
} catch(...) {
result = false;
}
return result;
} }
template<typename IdentifierT > template<typename IdentifierT >