Last change
on this file since 584 was 572, checked in by cp3-support, 13 years ago |
upgrade HepMC to version 2.06.05
|
File size:
1.3 KB
|
Rev | Line | |
---|
[572] | 1 | #ifndef HEPMC_IO_EXCEPTION_H
|
---|
| 2 | #define HEPMC_IO_EXCEPTION_H
|
---|
| 3 | // ----------------------------------------------------------------------
|
---|
| 4 | //
|
---|
| 5 | // IO_Exception.h
|
---|
| 6 | // Author: Lynn Garren
|
---|
| 7 | //
|
---|
| 8 | // IO exception handling
|
---|
| 9 | // IO_GenEvent, etc. catch the throw and set data members with the error type and message
|
---|
| 10 | // Some of the messages are constructed with transient information
|
---|
| 11 | // (e.g., contents of a bad GenParticle)
|
---|
| 12 | //
|
---|
| 13 | // ----------------------------------------------------------------------
|
---|
| 14 |
|
---|
| 15 |
|
---|
| 16 |
|
---|
| 17 | #include <stdexcept>
|
---|
| 18 |
|
---|
| 19 | namespace HepMC {
|
---|
| 20 |
|
---|
| 21 | //! IO exception handling
|
---|
| 22 |
|
---|
| 23 | ///
|
---|
| 24 | /// \class IO_Exception
|
---|
| 25 | /// IO_GenEvent, etc. catch the throw and set data members with the error type and message
|
---|
| 26 | /// Some of the messages are constructed with transient information
|
---|
| 27 | /// (e.g., contents of a bad GenParticle)
|
---|
| 28 | class IO_Exception : public std::runtime_error {
|
---|
| 29 | public:
|
---|
| 30 | IO_Exception(const std::string & msg)
|
---|
| 31 | : std::runtime_error(msg) { }
|
---|
| 32 |
|
---|
| 33 | /// IO error types
|
---|
| 34 | enum ErrorType{ OK,
|
---|
| 35 | NullEvent,
|
---|
| 36 | WrongFileType,
|
---|
| 37 | MissingStartKey,
|
---|
| 38 | EndOfStream,
|
---|
| 39 | EndKeyMismatch,
|
---|
| 40 | MissingEndKey,
|
---|
| 41 | InvalidData,
|
---|
| 42 | InputAndOutput,
|
---|
| 43 | BadOutputStream,
|
---|
| 44 | BadInputStream };
|
---|
| 45 |
|
---|
| 46 | };
|
---|
| 47 |
|
---|
| 48 | } // namespace HepMC
|
---|
| 49 |
|
---|
| 50 | #endif // HEPMC_IO_EXCEPTION_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.