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  :
116  GnashException(s)
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  :
142  ActionException(s)
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  :
167  ActionException(s)
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  :
188  ActionException(s)
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:
MediaException()
Definition: GnashException.h:59
GnashException()
Definition: GnashException.h:40
An ActionScript type error.
Definition: GnashException.h:160
ActionLimitException()
Definition: GnashException.h:145
ActionTypeError()
Definition: GnashException.h:170
virtual ~ActionTypeError()
Definition: GnashException.h:175
ActionException(const std::string &s)
Definition: GnashException.h:114
virtual ~ParserException()
Definition: GnashException.h:104
ActionParserException(const std::string &s)
Definition: GnashException.h:186
Definition: GnashException.h:181
An SWF parsing exception.
Definition: GnashException.h:89
virtual ~GnashException()
Definition: GnashException.h:45
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
ActionTypeError(const std::string &s)
Definition: GnashException.h:165
virtual ~ActionException()
Definition: GnashException.h:126
virtual ~ActionLimitException()
Definition: GnashException.h:150
SoundException()
Definition: GnashException.h:79
ParserException()
Definition: GnashException.h:99
ParserException(const std::string &s)
Definition: GnashException.h:94
SoundException(const std::string &s)
Definition: GnashException.h:74
#define DSOEXPORT
Definition: dsodefs.h:55
An ActionScript error exception.
Definition: GnashException.h:109
ActionException()
Definition: GnashException.h:119
MediaException(const std::string &s)
Definition: GnashException.h:54
GnashException(const std::string &s)
Definition: GnashException.h:35
ActionParserException()
Definition: GnashException.h:191
virtual ~ActionParserException()
Definition: GnashException.h:196
An ActionScript limit exception.
Definition: GnashException.h:135
virtual ~MediaException()
Definition: GnashException.h:64
Definition: GnashKey.h:165
An exception from MediaHandler subsystem.
Definition: GnashException.h:49
virtual ~SoundException()
Definition: GnashException.h:84
ActionLimitException(const std::string &s)
Definition: GnashException.h:140
Top-level gnash exception.
Definition: GnashException.h:30
An exception from SoundHandler subsystem.
Definition: GnashException.h:69