Caelum
CaelumExceptions.h
1 /*
2 This file is part of Caelum.
3 See http://www.ogre3d.org/wiki/index.php/Caelum
4 
5 Copyright (c) 2006-2008 Caelum team. See Contributors.txt for details.
6 
7 Caelum is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published
9 by the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Caelum is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16 
17 You should have received a copy of the GNU Lesser General Public License
18 along with Caelum. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef CAELUM__CAELUM_EXCEPTIONS_H
22 #define CAELUM__CAELUM_EXCEPTIONS_H
23 
24 #include "CaelumPrerequisites.h"
25 
26 namespace Caelum
27 {
32  class CAELUM_EXPORT UnsupportedException : public Ogre::Exception
33  {
34  public:
37  (
38  int number,
39  const Ogre::String &description,
40  const Ogre::String &source,
41  const char *file,
42  long line
43  ):
44  Ogre::Exception (number, description, source, "UnsupportedException", file, line)
45  {
46  }
47  };
48 
49 #define CAELUM_THROW_UNSUPPORTED_EXCEPTION(desc, src) \
50  throw UnsupportedException(-1, (desc), (src), __FILE__, __LINE__);
51 
52 }
53 
54 #endif // CAELUM__CAELUM_EXCEPTIONS_H
Exception class for unsupported features.
Caelum namespace.
Definition: Astronomy.cpp:24