Make most command-line tools return useful error codes on well-known exceptions.

This commit is contained in:
Daniel Patterson
2017-05-26 21:16:20 -07:00
committed by Patrick Niklaus
parent 03e83ec6a0
commit 3d77714c36
18 changed files with 229 additions and 39 deletions
+3 -1
View File
@@ -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);
}
}