From 533e2e2175147273e9cb306c42d4f6991b75d09c Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 6 Dec 2005 17:45:35 +0000 Subject: [PATCH] error handling --- stepmania/src/NotesWriterSM.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stepmania/src/NotesWriterSM.cpp b/stepmania/src/NotesWriterSM.cpp index 830a7556c6..16353eff05 100644 --- a/stepmania/src/NotesWriterSM.cpp +++ b/stepmania/src/NotesWriterSM.cpp @@ -295,7 +295,11 @@ bool NotesWriterSM::WriteEditFileToMachine( const Song *pSong, Steps *pSteps ) CString sTag; GetEditFileContents( pSong, pSteps, sTag ); - f.PutLine( sTag ); + if( f.PutLine(sTag) == -1 || f.Flush() == -1 ) + { + LOG->Warn( "Error writing song file '%s': %s", sPath.c_str(), f.GetError().c_str() ); + return false; + } return true; }