MySQLaux 0.6 is free software from Langensoft written by Thomas Langen.

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

MySQLaux/Error.h

Go to the documentation of this file.
00001 /* 
00002  * MySQLaux - auxiliary classes for communication with MySQL databases
00003  * Copyright  2001  Thomas Langen (langen@langensoft.com)
00004  * 
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  * 
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  * 
00019  * $Source: Error.h $
00020  * $Id: Error.h 1.2 Mon, 26 Mar 2001 19:33:26 +0200 langen $
00021  * $ProjectHeader: MySQLaux 0.6 Fri, 06 Apr 2001 10:30:48 +0200 langen $
00022  */
00023 
00024 #ifndef __MySQLaux_Error_h__
00025 #define __MySQLaux_Error_h__
00026 
00027 #include <stdexcept>
00028 #include "Exception.h"
00029 
00030 namespace MySQLaux
00031 {
00035   class Error
00036     : virtual public runtime_error,
00037       virtual public Exception
00038   {
00039   protected:
00040     unsigned int _errno;
00041     string _error;
00042   public:
00048     Error (unsigned int errno,
00049            char * error)
00050         : _errno (errno),
00051           _error (error)
00052     {
00053     }
00055     inline unsigned int   errno() const { return _errno; }
00057     inline string const error() const { return _error; }
00061     inline string asString() const throw() { return _error; }
00062   };
00063 }
00064 
00065 #endif // __MySQLaux_Error_h__
00066 
00067 
00068 /*
00069  * Local Variables:
00070  * mode: C++
00071  * fill-column: 80
00072  * c-comment-continuation-stars: " * "
00073  * End:
00074  */

Generated at Fri Apr 6 11:20:02 2001 for MySQLaux by doxygen1.2.5 written by Dimitri van Heesch, © 1997-2001