1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 07:13:49 +01:00

Add error check comments.

These are places where we don't properly handle error returns.
This commit is contained in:
James Crook
2016-07-09 21:20:35 +01:00
parent c8d5905bd3
commit 763485b0dc
19 changed files with 50 additions and 18 deletions

View File

@@ -714,6 +714,10 @@ bool AutoSaveFile::Decode(const wxString & fileName)
// "</project>" somewhere.
const int bufsize = 16;
char buf[bufsize + 1];
// FIXME: TRAP_ERR AutoSaveFile::Decode reports OK even when wxFFile errors.
// Might be incompletely written file, but not clear that is OK to be
// silent about.
if (file.SeekEnd(-bufsize))
{
if (file.Read(buf, bufsize) == bufsize)
@@ -755,6 +759,9 @@ bool AutoSaveFile::Decode(const wxString & fileName)
XMLFileWriter out;
// JKC: ANSWER-ME: Is the try catch actually doing anything?
// If it is useful, why are we not using it everywhere?
// If it isn't useful, why are we doing it here?
try
{
out.Open(tempName, wxT("wb"));