refactor: don't use varargs in tr_error (#2352)

This commit is contained in:
Charles Kerr
2021-12-27 20:32:22 -06:00
committed by GitHub
parent fa35b8ad39
commit 02aa2f46d4
20 changed files with 51 additions and 123 deletions

View File

@@ -311,7 +311,7 @@ bool gtr_file_trash_or_remove(std::string const& filename, tr_error** error)
catch (Glib::Error const& e)
{
g_message("Unable to trash file \"%s\": %s", filename.c_str(), e.what().c_str());
tr_error_set_literal(error, e.code(), e.what().c_str());
tr_error_set(error, e.code(), e.what().raw());
}
}
@@ -325,7 +325,7 @@ bool gtr_file_trash_or_remove(std::string const& filename, tr_error** error)
{
g_message("Unable to delete file \"%s\": %s", filename.c_str(), e.what().c_str());
tr_error_clear(error);
tr_error_set_literal(error, e.code(), e.what().c_str());
tr_error_set(error, e.code(), e.what().raw());
result = false;
}
}