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
@@ -108,7 +108,8 @@ int SourceContainer::LoadRasterSource(const std::string &path_string,
|
||||
boost::filesystem::path filepath(path_string);
|
||||
if (!boost::filesystem::exists(filepath))
|
||||
{
|
||||
throw util::exception(path_string + " does not exist" + SOURCE_REF);
|
||||
throw util::RuntimeError(
|
||||
path_string, ErrorCode::FileOpenError, SOURCE_REF, "File not found");
|
||||
}
|
||||
|
||||
RasterGrid rasterData{filepath, ncols, nrows};
|
||||
|
||||
Reference in New Issue
Block a user