fs/io/Reader: use C++ exceptions instead of class Error

This commit is contained in:
Max Kellermann
2015-12-16 11:05:33 +01:00
parent fe60c52c70
commit e6e7d6dbd6
33 changed files with 192 additions and 334 deletions

View File

@@ -102,17 +102,12 @@ StateFile::Write()
void
StateFile::Read()
{
try {
bool success;
FormatDebug(state_file_domain, "Loading state file %s", path_utf8.c_str());
Error error;
TextFile file(path, error);
if (file.HasFailed()) {
LogError(error);
return;
}
TextFile file(path);
#ifdef ENABLE_DATABASE
const SongLoader song_loader(partition.instance.database,
@@ -135,6 +130,8 @@ StateFile::Read()
}
RememberVersions();
} catch (const std::exception &e) {
LogError(e);
}
void