SanitException.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (C) 2002-2006 Rational Discovery LLC
00003 //
00004 //   @@ All Rights Reserved @@
00005 //  This file is part of the RDKit.
00006 //  The contents are covered by the terms of the BSD license
00007 //  which is included in the file license.txt, found at the root
00008 //  of the RDKit source tree.
00009 //
00010 
00011 #ifndef _RD_SANITEXCEPTION_H
00012 #define _RD_SANITEXCEPTION_H
00013 
00014 #include <RDGeneral/types.h>
00015 #include <GraphMol/GraphMol.h>
00016 #include <GraphMol/Atom.h>
00017 #include <GraphMol/Bond.h>
00018 
00019 #include <string>
00020 #include <vector>
00021 #include <exception>
00022 
00023 namespace RDKit {
00024   
00025   //! class for flagging sanitization errors
00026   class MolSanitizeException : public std::exception {
00027     public :
00028       MolSanitizeException(const char *msg) : _msg(msg) {};
00029       MolSanitizeException(const std::string msg) : _msg(msg) {};
00030       const char *message () const { return _msg.c_str(); };
00031       ~MolSanitizeException () throw () {};
00032     
00033     private :
00034       std::string _msg;
00035   };
00036 }
00037 
00038 #endif