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(
const IdentifierT id
) {
OSRMLockFile lock_file;
boost::interprocess::xsi_key key( lock_file().string().c_str(), id );
return RegionExists(key);
bool result = true;
try {
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 >