From 91057359fa50cb138c1ef097dd99c0335f2672eb Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 5 Aug 2003 01:28:48 +0000 Subject: [PATCH] add error checking --- stepmania/src/RageLog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stepmania/src/RageLog.cpp b/stepmania/src/RageLog.cpp index 08d97dd416..a953030871 100644 --- a/stepmania/src/RageLog.cpp +++ b/stepmania/src/RageLog.cpp @@ -90,7 +90,12 @@ RageLog::RageLog() // Open log file and leave it open. m_fileLog = Ragefopen( LOG_PATH, "w" ); + if( m_fileLog == NULL ) + RageException::Throw( " Couldn't open log.txt: %s", strerror(errno) ); + m_fileInfo = Ragefopen( INFO_PATH, "w" ); + if( m_fileInfo == NULL ) + RageException::Throw( " Couldn't open info.txt: %s", strerror(errno) ); #if defined(_MSC_VER) this->Trace( "Last compiled on %s.", __TIMESTAMP__ );