fail gracefully when lock file is not present
This commit is contained in:
parent
aaec0e641b
commit
a7449c913c
@ -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 >
|
||||||
|
Loading…
Reference in New Issue
Block a user