Main Page | Modules | Class Hierarchy | Compound List | File List | Compound Members | Related Pages

Error.h

00001 /*****************************************************************************
00002  * Author:   Valient Gough <vgough@pobox.com>
00003  *
00004  *****************************************************************************
00005  * Copyright (c) 2004, Valient Gough
00006  *
00007  * This library is free software; you can distribute it and/or modify it under
00008  * the terms of the GNU Lesser General Public License (LGPL), as published by
00009  * the Free Software Foundation; either version 2.1 of the License, or (at your
00010  * option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful, but WITHOUT
00013  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014  * FITNESS FOR A PARTICULAR PURPOSE.  See the LGPL in the file COPYING for more
00015  * details.
00016  *
00017  */
00018                                                                                                 
00019                              
00020 #ifndef _Error_incl_
00021 #define _Error_incl_
00022 
00023 #include <stdexcept>
00024 
00025 namespace rlog
00026 {
00027     class RLogChannel;
00028 
00029     // Documentation in implementation file
00030     class Error : public std::runtime_error
00031     {
00032     public:
00033         Error( const char *component, const char *file, const char *function,
00034                 int line, const char *msg );
00035         Error(const Error &src );
00036         virtual ~Error() throw();
00037 
00038         Error &operator = (const Error &src);
00039 
00040         void log( RLogChannel * channel ) const;
00041 
00042         const char *component() const;
00043         const char *file() const;
00044         const char *function() const;
00045         int line() const;
00046         const char *message() const;
00047 
00048     private:
00049         struct ErrorData *data;
00050     };
00051 
00052 }
00053 
00054 #endif
00055 

Generated on Sun Mar 14 14:49:50 2004 for rlog by doxygen 1.3.2