Gnash  0.8.10
GnashException.h
Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
00003 //   Free Software Foundation, Inc
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 3 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 
00019 #ifndef GNASH_GNASHEXCEPTION_H
00020 #define GNASH_GNASHEXCEPTION_H
00021 
00022 #include <stdexcept>
00023 #include <string>
00024 #include "dsodefs.h"
00025 
00026 namespace gnash
00027 {
00028 
00030 class DSOEXPORT GnashException: public std::runtime_error
00031 {
00032 
00033 public:
00034 
00035         GnashException(const std::string& s)
00036                 :
00037         std::runtime_error(s)
00038         {}
00039 
00040         GnashException()
00041                 :
00042         std::runtime_error("Generic error")
00043         {}
00044 
00045         virtual ~GnashException() throw() {}
00046 };
00047 
00049 class DSOEXPORT MediaException : public GnashException
00050 {
00051 
00052 public:
00053 
00054         MediaException(const std::string& s)
00055                 :
00056                 GnashException(s)
00057         {}
00058 
00059         MediaException()
00060                 :
00061                 GnashException("Media error")
00062         {}
00063 
00064         virtual ~MediaException() throw() {}
00065 
00066 };
00067 
00069 class DSOEXPORT SoundException : public GnashException
00070 {
00071 
00072 public:
00073 
00074         SoundException(const std::string& s)
00075                 :
00076                 GnashException(s)
00077         {}
00078 
00079         SoundException()
00080                 :
00081                 GnashException("Audio error")
00082         {}
00083 
00084         virtual ~SoundException() throw() {}
00085 
00086 };
00087 
00089 class DSOEXPORT ParserException : public GnashException
00090 {
00091 
00092 public:
00093 
00094         ParserException(const std::string& s)
00095                 :
00096                 GnashException(s)
00097         {}
00098 
00099         ParserException()
00100                 :
00101                 GnashException("Parser error")
00102         {}
00103 
00104         virtual ~ParserException() throw() {}
00105 
00106 };
00107 
00109 class ActionException: public GnashException
00110 {
00111 
00112 protected:
00113 
00114         ActionException(const std::string& s)
00115                 :
00116                 GnashException(s)
00117         {}
00118 
00119         ActionException()
00120                 :
00121                 GnashException("ActionScript error")
00122         {}
00123 
00124 public:
00125 
00126         virtual ~ActionException() throw() {}
00127 
00128 };
00129 
00131 //
00135 class ActionLimitException: public ActionException
00136 {
00137 
00138 public:
00139 
00140         ActionLimitException(const std::string& s)
00141                 :
00142                 ActionException(s)
00143         {}
00144 
00145         ActionLimitException()
00146                 :
00147                 ActionException("ActionScript limit hit")
00148         {}
00149 
00150         virtual ~ActionLimitException() throw() {}
00151 
00152 };
00153 
00155 //
00160 class ActionTypeError: public ActionException
00161 {
00162 
00163 public:
00164 
00165         ActionTypeError(const std::string& s)
00166                 :
00167                 ActionException(s)
00168         {}
00169 
00170         ActionTypeError()
00171                 :
00172                 ActionException("ActionTypeError")
00173         {}
00174 
00175         virtual ~ActionTypeError() throw() {}
00176 
00177 };
00178 
00181 class ActionParserException: public ActionException
00182 {
00183 
00184 public:
00185 
00186         ActionParserException(const std::string& s)
00187                 :
00188                 ActionException(s)
00189         {}
00190 
00191         ActionParserException()
00192                 :
00193                 ActionException("Action parser exception")
00194         {}
00195 
00196         virtual ~ActionParserException() throw() {}
00197 
00198 };
00199 
00200 } // namespace gnash
00201 
00202 #endif // def GNASH_GNASHEXCEPTION_H
00203 
00204 
00205 // Local Variables:
00206 // mode: C++
00207 // c-basic-offset: 8 
00208 // tab-width: 8
00209 // indent-tabs-mode: t
00210 // End: