config/Block: GetPath() throws exception on error

This commit is contained in:
Max Kellermann
2016-10-28 23:08:42 +02:00
parent d8bcdca55a
commit e17805f208
8 changed files with 23 additions and 55 deletions

View File

@@ -111,11 +111,11 @@ struct ConfigBlock {
/**
* Same as config_get_path(), but looks up the setting in the
* specified block.
*
* Throws #std::runtime_error on error.
*/
AllocatedPath GetPath(const char *name, const char *default_value,
Error &error) const;
AllocatedPath GetPath(const char *name, Error &error) const;
AllocatedPath GetPath(const char *name,
const char *default_value=nullptr) const;
gcc_pure
int GetBlockValue(const char *name, int default_value) const;