
7 Sep
2009
7 Sep
'09
5:43 a.m.
Pierre Morcello wrote:
Breakable { if(!filestream.bad()) { log("error at opening file"); break; }
if(!filestream.good()) { log("error inside the file (eof)"); break; }
if(!xmlLoadFrom(filestream)) { log("the file is no xml document."); break; }
// and so on, to test if the xml is valid, etc... }
And why not just add the else? if(!filestream.bad()) { log("error at opening file"); } else if(!filestream.good()) { log("error inside the file (eof)"); } else if(!xmlLoadFrom(filestream)) { log("the file is no xml document."); } -- ---------------------------------- Michael Caisse Object Modeling Designs www.objectmodelingdesigns.com