Gnash  0.8.11dev
GnashException.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3 // Free Software Foundation, Inc
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 #ifndef GNASH_GNASHEXCEPTION_H
20 #define GNASH_GNASHEXCEPTION_H
21 
22 #include <stdexcept>
23 #include <string>
24 #include "dsodefs.h"
25 
26 namespace gnash
27 {
28 
30 class DSOEXPORT GnashException: public std::runtime_error
31 {
32 
33 public:
34 
35  GnashException(const std::string& s)
36  :
37  std::runtime_error(s)
38  {}
39 
41  :
42  std::runtime_error("Generic error")
43  {}
44 
45  virtual ~GnashException() throw() {}
46 };
47 
50 {
51 
52 public:
53 
54  MediaException(const std::string& s)
55  :
57  {}
58 
60  :
61  GnashException("Media error")
62  {}
63 
64  virtual ~MediaException() throw() {}
65 
66 };
67 
70 {
71 
72 public:
73 
74  SoundException(const std::string& s)
75  :
77  {}
78 
80  :
81  GnashException("Audio error")
82  {}
83 
84  virtual ~SoundException() throw() {}
85 
86 };
87 
90 {
91 
92 public:
93 
94  ParserException(const std::string& s)
95  :
97  {}
98 
100  :
101  GnashException("Parser error")
102  {}
103 
104  virtual ~ParserException() throw() {}
105 
106 };
107 
110 {
111 
112 protected:
113 
114  ActionException(const std::string& s)
115  :
117  {}
118 
120  :
121  GnashException("ActionScript error")
122  {}
123 
124 public:
125 
126  virtual ~ActionException() throw() {}
127 
128 };
129 
131 //
136 {
137 
138 public:
139 
140  ActionLimitException(const std::string& s)
141  :
143  {}
144 
146  :
147  ActionException("ActionScript limit hit")
148  {}
149 
150  virtual ~ActionLimitException() throw() {}
151 
152 };
153 
155 //
161 {
162 
163 public:
164 
165  ActionTypeError(const std::string& s)
166  :
168  {}
169 
171  :
172  ActionException("ActionTypeError")
173  {}
174 
175  virtual ~ActionTypeError() throw() {}
176 
177 };
178 
182 {
183 
184 public:
185 
186  ActionParserException(const std::string& s)
187  :
189  {}
190 
192  :
193  ActionException("Action parser exception")
194  {}
195 
196  virtual ~ActionParserException() throw() {}
197 
198 };
199 
200 } // namespace gnash
201 
202 #endif // def GNASH_GNASHEXCEPTION_H
203 
204 
205 // Local Variables:
206 // mode: C++
207 // c-basic-offset: 8
208 // tab-width: 8
209 // indent-tabs-mode: t
210 // End:
gnash::MediaException::~MediaException
virtual ~MediaException()
Definition: GnashException.h:64
gnash::ActionException::ActionException
ActionException(const std::string &s)
Definition: GnashException.h:114
gnash::MediaException::MediaException
MediaException()
Definition: GnashException.h:59
gnash::GnashException
Top-level gnash exception.
Definition: GnashException.h:31
gnash::ActionParserException
Definition: GnashException.h:182
dsodefs.h
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::SoundException
An exception from SoundHandler subsystem.
Definition: GnashException.h:70
gnash::GnashException::~GnashException
virtual ~GnashException()
Definition: GnashException.h:45
gnash::ActionLimitException::ActionLimitException
ActionLimitException()
Definition: GnashException.h:145
gnash::key::s
@ s
Definition: GnashKey.h:165
gnash::ParserException::ParserException
ParserException()
Definition: GnashException.h:99
gnash::ActionException::~ActionException
virtual ~ActionException()
Definition: GnashException.h:126
gnash::ActionTypeError::~ActionTypeError
virtual ~ActionTypeError()
Definition: GnashException.h:175
gnash::ActionTypeError::ActionTypeError
ActionTypeError(const std::string &s)
Definition: GnashException.h:165
gnash::ActionTypeError
An ActionScript type error.
Definition: GnashException.h:161
gnash::SoundException::SoundException
SoundException(const std::string &s)
Definition: GnashException.h:74
gnash::SoundException::SoundException
SoundException()
Definition: GnashException.h:79
gnash::ActionParserException::ActionParserException
ActionParserException()
Definition: GnashException.h:191
gnash::ActionLimitException::~ActionLimitException
virtual ~ActionLimitException()
Definition: GnashException.h:150
gnash::ParserException
An SWF parsing exception.
Definition: GnashException.h:90
gnash::ActionException::ActionException
ActionException()
Definition: GnashException.h:119
gnash::MediaException::MediaException
MediaException(const std::string &s)
Definition: GnashException.h:54
gnash::ParserException::~ParserException
virtual ~ParserException()
Definition: GnashException.h:104
gnash::ActionTypeError::ActionTypeError
ActionTypeError()
Definition: GnashException.h:170
gnash::ActionException
An ActionScript error exception.
Definition: GnashException.h:110
gnash::ActionLimitException
An ActionScript limit exception.
Definition: GnashException.h:136
gnash::ActionParserException::ActionParserException
ActionParserException(const std::string &s)
Definition: GnashException.h:186
gnash::SoundException::~SoundException
virtual ~SoundException()
Definition: GnashException.h:84
gnash::ActionLimitException::ActionLimitException
ActionLimitException(const std::string &s)
Definition: GnashException.h:140
DSOEXPORT
#define DSOEXPORT
Definition: dsodefs.h:55
gnash::GnashException::GnashException
GnashException()
Definition: GnashException.h:40
gnash::GnashException::GnashException
GnashException(const std::string &s)
Definition: GnashException.h:35
gnash::ParserException::ParserException
ParserException(const std::string &s)
Definition: GnashException.h:94
gnash::MediaException
An exception from MediaHandler subsystem.
Definition: GnashException.h:50
gnash::ActionParserException::~ActionParserException
virtual ~ActionParserException()
Definition: GnashException.h:196