RDKit: BadFileException.h Source File

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

BadFileException.h
Go to the documentation of this file.
1 //
2 // Copyright 2003-2006 Greg Landrum and 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_BADFILEEXCEPTION_H
11 #define _RD_BADFILEEXCEPTION_H
12
13 #include <string>
14 #include <vector>
15 #include <stdexcept>
16
17 namespace RDKit {
18
19 //! used by various file parsing classes to indicate a bad file
20 class BadFileException : public std::runtime_error {
21 public:
22 //! construct with an error message
23 explicit BadFileException(const char *msg)
24 : std::runtime_error("BadFileException"), _msg(msg){};
25 //! construct with an error message
26 explicit BadFileException(const std::string &msg)
27 : std::runtime_error("BadFileException"), _msg(msg){};
28 //! get the error message
29 const char *message() const { return _msg.c_str(); };
30 ~BadFileException() throw(){};
31
32 private:
33 std::string _msg;
34 };
35 }
36
37 #endif
RDKit::BadFileException::message
const char * message() const
get the error message
Definition: BadFileException.h:29
RDKit::BadFileException
used by various file parsing classes to indicate a bad file
Definition: BadFileException.h:20
std
STL namespace.
RDKit::BadFileException::BadFileException
BadFileException(const std::string &msg)
construct with an error message
Definition: BadFileException.h:26
RDKit::BadFileException::~BadFileException
~BadFileException()
Definition: BadFileException.h:30
RDKit
Std stuff.
Definition: Atom.h:29
RDKit::BadFileException::BadFileException
BadFileException(const char *msg)
construct with an error message
Definition: BadFileException.h:23