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

@@ -85,12 +85,9 @@ static bool
sidplay_init(const ConfigBlock &block)
{
/* read the songlengths database file */
Error error;
const auto database_path = block.GetPath("songlength_database", error);
const auto database_path = block.GetPath("songlength_database");
if (!database_path.IsNull())
songlength_database = sidplay_load_songlength_db(database_path);
else if (error.IsDefined())
FatalError(error);
default_songlength = block.GetBlockValue("default_songlength", 0u);