TFile File("smoehting.txt"): if (File.IsZombie()) printf(...); You can disable the ROOT error messages by setting the global gErrorIgnoreLevel to > then the level you want to disable (see Terror.h). TO disable all messages set gErrorIgenoreLevel = 5000; Cheers, Fons. joe robe wrote: > Hi, > > I cant find any documentaion on ROOT error handling. > Is there any way to CHECK for errors and avoid > printing them in the console window (for a QT based > project) ? > > I.e. if I open an NON ROOT file with TFile an error is > printed, but how can I CHECK for this and do something > like > > TFile File("smoehting.txt"): > if(File.Error()) > printf("file is not a root file"); > > Joe > > __________________________________________________ > Do You Yahoo!? > Send FREE video emails in Yahoo! Mail! > http://promo.yahoo.com/videomail/ > > -- Org: CERN, European Laboratory for Particle Physics. Mail: 1211 Geneve 23, Switzerland E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248 WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7679480
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:38 MET