RDCode: FileParseException.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories

# FileParseException.h

Go to the documentation of this file.

    00001 //
    00002 // Copyright 2003-2006 Rational Discovery LLC
    00003 //
    00004 //  @@ All Rights Reserved @@
    00005 //
    00006 #ifndef _RD_FILEPARSEEXCEPTION_H
    00007 #define _RD_FILEPARSEEXCEPTION_H
    00008
    00009 #include <string>
    00010 #include <exception>
    00011
    00012 namespace RDKit {
    00013   //! used by various file parsing classes to indicate a parse error
    00014   class FileParseException : public std::exception {
    00015   public:
    00016     //! construct with an error message
    00017     explicit FileParseException(const char *msg) : _msg(msg) {};
    00018     //! construct with an error message
    00019     explicit FileParseException(const std::string msg) : _msg(msg) {};
    00020     //! get the error message
    00021     const char *message () const { return _msg.c_str(); };
    00022     ~FileParseException () throw () {};
    00023   private:
    00024     std::string _msg;
    00025   };
    00026 }
    00027
    00028 #endif
    00029