#ifndef _GATS_DB_EXCEPTION_H_ #define _GATS_DB_EXCEPTION_H_ /** @file GATS_DB_Exception.h @brief Header for the GATS_DB_Exception class and derivatives. @date $Date$ @version $Rev$ @author - Lance Deaver @copyright (©) Copyright 2006 by GATS Inc. 11864 Canon Blvd., Suite 101, Newport News, VA 23606 All Rights Reserved. No part of this software or publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of GATS Inc. @see gatsDBpp::GATS_DB_Exception @todo Add an EXPORT macro so windows users can preface functions with the decspl wen constructing DLL files. @bug None known $Id$ */ #include "GATS_Exception.h" namespace gatsDBpp { class GATS_DB_Exception : public GATS_Exception { public: /** * @brief GATS_DB_Exception copy constructor. */ GATS_DB_Exception(const GATS_DB_Exception& e) throw() : GATS_Exception(e) {} /** * @brief Destroy the GATS_DB_Exception object. */ virtual ~GATS_DB_Exception() throw() {} /** * @brief GATS_DB_Exception assignment operator. */ GATS_DB_Exception& operator=(const GATS_DB_Exception& rhs) throw(); protected: /** * @brief Construct a GATS_DB_Exception object */ GATS_DB_Exception(const char* w, const char* filename, const unsigned int linenumber) throw() : GATS_Exception(w,filename,linenumber) {} }; // The different types of GATS_database exception objects /** * The DBConnectionFailed object is thrown if a Database * connection could not be established. */ class DBConnectionFailed : public GATS_DB_Exception { public: /** * @brief DBConnectionFailed Constructor */ DBConnectionFailed(const char* w, const char* filename, const unsigned int linenumber) : GATS_DB_Exception(w,filename,linenumber) {} }; /** * The BadQuery object is thrown if the database return any error code * when executing an SQL statement. */ class BadQuery : public GATS_DB_Exception { public: /** * @brief BadQuery constructor */ BadQuery(const char* w, const char* filename, const unsigned int linenumber) : GATS_DB_Exception(w,filename,linenumber) {} }; /** * The ColDataIsNull object is thrown if trying to reference any conversion method * of the ColData object when it contains NULL */ class ColDataIsNull : public GATS_DB_Exception { public: /** * @brief ColDataIsNull constructor */ ColDataIsNull(const char* w, const char* filename, const unsigned int linenumber) : GATS_DB_Exception(w,filename,linenumber) {} }; /** * The UnknownDatabaseType object is thrown if there is no specialized class for * the derived database class type. */ class UnknownDatabaseType : public GATS_DB_Exception { public: /** * @brief UnknownDatabaseType constructor */ UnknownDatabaseType(const char* w, const char* filename, const unsigned int linenumber) : GATS_DB_Exception(w,filename,linenumber) {} }; } //end namespace #endif //_GATS_DB_EXCEPTION_H_