![]() |
HepMC Reference DocumentationHepMC |
00001 #ifndef HEPMC_IO_EXCEPTION_H 00002 #define HEPMC_IO_EXCEPTION_H 00003 // ---------------------------------------------------------------------- 00004 // 00005 // IO_Exception.h 00006 // Author: Lynn Garren 00007 // 00008 // IO exception handling 00009 // IO_GenEvent, etc. catch the throw and set data members with the error type and message 00010 // Some of the messages are constructed with transient information 00011 // (e.g., contents of a bad GenParticle) 00012 // 00013 // ---------------------------------------------------------------------- 00014 00015 00016 00017 #include <stdexcept> 00018 00019 namespace HepMC { 00020 00022 00028 class IO_Exception : public std::runtime_error { 00029 public: 00030 IO_Exception(const std::string & msg) 00031 : std::runtime_error(msg) { } 00032 00034 enum ErrorType{ OK, 00035 NullEvent, 00036 WrongFileType, 00037 MissingStartKey, 00038 EndOfStream, 00039 EndKeyMismatch, 00040 MissingEndKey, 00041 InvalidData, 00042 InputAndOutput, 00043 BadOutputStream, 00044 BadInputStream }; 00045 00046 }; 00047 00048 } // namespace HepMC 00049 00050 #endif // HEPMC_IO_EXCEPTION_H