config/Global: _get_path() throws exception on error

This commit is contained in:
Max Kellermann
2016-11-02 10:01:29 +01:00
parent 5a63d1d5a4
commit d765182bbb
4 changed files with 25 additions and 60 deletions

View File

@@ -28,7 +28,6 @@
#include "ConfigError.hxx"
#include "fs/Path.hxx"
#include "fs/AllocatedPath.hxx"
#include "util/Error.hxx"
#include "system/FatalError.hxx"
#include "Log.hxx"
@@ -122,13 +121,13 @@ config_get_string(ConfigOption option, const char *default_value)
}
AllocatedPath
config_get_path(ConfigOption option, Error &error)
config_get_path(ConfigOption option)
{
const auto *param = config_get_param(option);
if (param == nullptr)
return AllocatedPath::Null();
return param->GetPath(error);
return param->GetPath();
}
unsigned