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 #ifndef _DATASTRUCTS_EXCEPTION_H_20050126
12 #define _DATASTRUCTS_EXCEPTION_H_20050126
13 
14 class DatastructsException : public std::exception {
15  public:
16  //! construct with an error message
17  DatastructsException(const char *msg) : _msg(msg){};
18  //! construct with an error message
19  DatastructsException(const std::string &msg) : _msg(msg){};
20  //! get the error message
21  const char *message() const { return _msg.c_str(); };
22  ~DatastructsException() throw(){};
23 
24  private:
25  std::string _msg;
26 };
27 
28 #endif
DatastructsException(const char *msg)
construct with an error message
DatastructsException(const std::string &msg)
construct with an error message
const char * message() const
get the error message