- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# gbLib/include/gbException.hpp

Go to the documentation of this file.

    00001
    00012 #ifndef _GHULBUSEXCEPTION_HPP_INCLUDE_GUARD_
    00013 #define _GHULBUSEXCEPTION_HPP_INCLUDE_GUARD_
    00014
    00015 #include <iostream>
    00016 #include <exception>
    00017
    00018 namespace Ghulbus {
    00021     class gbException: public ::std::exception {
    00022     public:
    00023         typedef enum {
    00024             GB_OK=0,
    00025             GB_FAILED,
    00026             GB_OUTOFMEMORY,
    00027             GB_ILLEGALPARAMETER,
    00028             GB_INVALIDCONTEXT,
    00029             GB_NOTIMPLEMENTED,
    00030         } GBERROR;
    00031     private:
    00032         GBERROR m_errorcode;
    00033         const char* m_errorstring;
    00034     public:
    00038         gbException() throw();
    00042         gbException(GBERROR e) throw();
    00047         gbException(GBERROR e, const char* str) throw();
    00050         gbException(gbException const& e) throw();
    00053         virtual ~gbException() throw();
    00057         char const* GetErrorString() const throw();
    00061         GBERROR GetErrorCode() const throw ();
    00064         gbException& operator=(gbException const& e) throw();
    00068         virtual char const* what() const throw();
    00069     };
    00070
    00073     ::std::ostream& operator<<(::std::ostream& os, ::Ghulbus::gbException const& e);
    00074 };
    00075
    00076 #endif