From 8d89956f8eb88aaaedf0b487047f0b600dd16b2e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 2 Apr 2004 05:06:32 +0000 Subject: [PATCH] output on failure --- stepmania/src/XmlFile.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stepmania/src/XmlFile.cpp b/stepmania/src/XmlFile.cpp index b13ec684cc..3c410487d5 100644 --- a/stepmania/src/XmlFile.cpp +++ b/stepmania/src/XmlFile.cpp @@ -8,6 +8,7 @@ #include #include #include "RageFile.h" +#include "RageLog.h" static const TCHAR chXMLTagOpen = '<'; @@ -1222,7 +1223,10 @@ bool _tagXMLNode::LoadFromFile( CString sFile, LPPARSEINFO pi ) { RageFile f; if( !f.Open(sFile, RageFile::READ) ) + { + LOG->Warn("Couldn't open %s for reading: %s", sFile.c_str(), f.GetError().c_str() ); return false; + } CString s; f.Read( s ); this->Load( s, pi ); @@ -1233,7 +1237,10 @@ bool _tagXMLNode::SaveToFile( CString sFile, LPDISP_OPT opt ) { RageFile f; if( !f.Open(sFile, RageFile::WRITE) ) + { + LOG->Warn("Couldn't open %s for writing: %s", sFile.c_str(), f.GetError().c_str() ); return false; + } f.Write( this->GetXML(opt) ); return true; }