RDKit
Open-source cheminformatics and machine learning.
DatastructsException.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005-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 
11 #include <RDGeneral/export.h>
12 #ifndef _DATASTRUCTS_EXCEPTION_H_20050126
13 #define _DATASTRUCTS_EXCEPTION_H_20050126
14 
15 class RDKIT_DATASTRUCTS_EXPORT DatastructsException : public std::exception {
16  public:
17  //! construct with an error message
18  DatastructsException(const char *msg) : _msg(msg){};
19  //! construct with an error message
20  DatastructsException(const std::string &msg) : _msg(msg){};
21  //! get the error message
22  const char *message() const { return _msg.c_str(); };
23  ~DatastructsException() throw(){};
24 
25  private:
26  std::string _msg;
27 };
28 
29 #endif
#define RDKIT_DATASTRUCTS_EXPORT
Definition: export.h:112
const char * message() const
get the error message
DatastructsException(const char *msg)
construct with an error message
DatastructsException(const std::string &msg)
construct with an error message