Make most command-line tools return useful error codes on well-known exceptions.
This commit is contained in:
committed by
Patrick Niklaus
parent
03e83ec6a0
commit
3d77714c36
+3
-1
@@ -36,7 +36,9 @@ OSRM::OSRM(engine::EngineConfig &config)
|
||||
// throw error if dataset is not usable with CoreCH
|
||||
if (config.algorithm == EngineConfig::Algorithm::CoreCH && !corech_compatible)
|
||||
{
|
||||
throw util::exception("Dataset is not compatible with CoreCH.");
|
||||
throw util::RuntimeError("Dataset is not compatible with CoreCH.",
|
||||
ErrorCode::IncompatibleDataset,
|
||||
SOURCE_REF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user