RDKit: FileParseException.h Source File

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

FileParseException.h
Go to the documentation of this file.
1 //
2 // Copyright 2003-2006 Rational Discovery LLC
3 //
4 // @@ All Rights Reserved @@
5 // This file is part of the RDKit.
6 // The contents are covered by the terms of the BSD license
7 // which is included in the file license.txt, found at the root
8 // of the RDKit source tree.
9 //
10 #ifndef _RD_FILEPARSEEXCEPTION_H
11 #define _RD_FILEPARSEEXCEPTION_H
12
13 #include <string>
14 #include <stdexcept>
15
16 namespace RDKit {
17 //! used by various file parsing classes to indicate a parse error
18 class FileParseException : public std::runtime_error {
19 public:
20 //! construct with an error message
21 explicit FileParseException(const char *msg)
22 : std::runtime_error("FileParseException"), _msg(msg){};
23 //! construct with an error message
24 explicit FileParseException(const std::string msg)
25 : std::runtime_error("FileParseException"), _msg(msg){};
26 //! get the error message
27 const char *message() const { return _msg.c_str(); };
28 ~FileParseException() throw(){};
29
30 private:
31 std::string _msg;
32 };
33 }
34
35 #endif
std
STL namespace.
RDKit::FileParseException::FileParseException
FileParseException(const char *msg)
construct with an error message
Definition: FileParseException.h:21
RDKit::FileParseException::~FileParseException
~FileParseException()
Definition: FileParseException.h:28
RDKit
Std stuff.
Definition: Atom.h:29
RDKit::FileParseException::FileParseException
FileParseException(const std::string msg)
construct with an error message
Definition: FileParseException.h:24
RDKit::FileParseException
used by various file parsing classes to indicate a parse error
Definition: FileParseException.h:18
RDKit::FileParseException::message
const char * message() const
get the error message
Definition: FileParseException.h:27