Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

exception.hh

Go to the documentation of this file.
00001 /*
00002  * PIAVE - PIAVE Is A Video Editor
00003  *
00004  * Copyright (C) 2002 Rolf Dubitzky, rolf@dubitzky.de
00005  *
00006  */
00007 
00008 /*
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software Foundation,
00021  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00022  */
00023 
00036 #if ! defined ( EXCEPTION_HH )
00037 #define EXCEPTION_HH
00038 
00039 #include <exception>
00040 #include <string>
00041 
00042 namespace PIAVE {
00043 
00044     class exception: public std::exception
00045     {
00046       public:
00047         explicit exception( const std::string& message ) :
00048           _message( message ) {}
00049         virtual ~exception() throw() {};
00050 
00051         virtual const char* what() const throw() { return _message.c_str(); }
00052 
00053       private:
00054         std::string _message;
00055     };
00056 
00057     class stream_error : public exception
00058     {
00059       public:
00060         explicit stream_error(const std::string& message) : 
00061           exception( message ) {};
00062         virtual ~stream_error() throw() {};
00063     };
00064 
00065     class file_error : public stream_error
00066     {
00067       public:
00068         explicit file_error(const std::string& message) : 
00069           stream_error( message ) {};
00070         virtual ~file_error() throw() {};
00071     };
00072 
00073     class file_type_error : public file_error
00074     {
00075       public:
00076         explicit file_type_error(const std::string& message) : 
00077           file_error( message ) {};
00078         virtual ~file_type_error() throw() {};
00079     };
00080 
00081     class video_stream_error : public stream_error
00082     {
00083       public:
00084         explicit video_stream_error(const std::string& message) : 
00085           stream_error( message ) {};
00086         virtual ~video_stream_error() throw() {};
00087     };
00088 
00089     class audio_stream_error : public stream_error
00090     {
00091       public:
00092         explicit audio_stream_error(const std::string& message) : 
00093           stream_error( message ) {};
00094         virtual ~audio_stream_error() throw() {};
00095     };
00096     
00097     class codec_error : public stream_error
00098     {
00099       public:
00100         explicit codec_error(const std::string& message) :
00101           stream_error( message ) {};
00102         virtual ~codec_error() throw() {};
00103     };
00104     
00105 } 
00106 
00107 #endif

Generated on Tue Oct 14 20:45:36 2003 for piave by doxygen1.2.18