From ed6ae1fa0cf77424c5ceac6d85e4dafecc8f90dd Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 25 Jan 2005 18:54:46 +0000 Subject: [PATCH] load errors should not be fatal --- stepmania/src/NotesLoaderSM.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/stepmania/src/NotesLoaderSM.cpp b/stepmania/src/NotesLoaderSM.cpp index 233d790932..6bbaf71baa 100644 --- a/stepmania/src/NotesLoaderSM.cpp +++ b/stepmania/src/NotesLoaderSM.cpp @@ -180,7 +180,10 @@ bool SMLoader::LoadFromSMFile( CString sPath, Song &out ) MsdFile msd; if( !msd.ReadFile( sPath ) ) - RageException::Throw( "Error opening file \"%s\": %s", sPath.c_str(), msd.GetError().c_str() ); + { + LOG->Warn( "Error opening file \"%s\": %s", sPath.c_str(), msd.GetError().c_str() ); + return false; + } out.m_Timing.m_sFile = sPath; LoadTimingFromSMFile( msd, out.m_Timing ); @@ -380,7 +383,10 @@ bool SMLoader::LoadFromDir( CString sPath, Song &out ) GetApplicableFiles( sPath, aFileNames ); if( aFileNames.size() > 1 ) - RageException::Throw( "There is more than one SM file in '%s'. There should be only one!", sPath.c_str() ); + { + LOG->Warn( "There is more than one SM file in '%s'. There should be only one!", sPath.c_str() ); + return false; + } /* We should have exactly one; if we had none, we shouldn't have been * called to begin with. */ @@ -402,7 +408,10 @@ bool SMLoader::LoadEdit( CString sEditFilePath, ProfileSlot slot ) MsdFile msd; if( !msd.ReadFile( sEditFilePath ) ) - RageException::Throw( "Error opening file \"%s\": %s", sEditFilePath.c_str(), msd.GetError().c_str() ); + { + LOG->Warn( "Error opening edit file \"%s\": %s", sEditFilePath.c_str(), msd.GetError().c_str() ); + return false; + } Song* pSong = NULL;