WARNING: USE THIS SOFTWARE AT YOUR OWN RISK! THIS IS EXPERIMENTAL SOFTWARE NOT INTENDED FOR PRODUCTION USE! Zuble is currently an early stage prototype. As such Zuble is minimally tested and inherently unstable. It is provided for experimental, development, and demonstration purposes only. Zuble QML Types   |  Zuble C++ Classes   |  Zuble Overview
Zuble  0.1
Zuble Framework C++/QML extension API
ZblException.h
Go to the documentation of this file.
1 /*
2  * Zuble - A run-time system for QML/Javascript applications
3  * Copyright (C) 2013, 2014 Bob Dinitto
4  *
5  * ZblException.h
6  *
7  * Created on: Nov 15, 2010
8  * Author: Bob Dinitto bob@ninzo.com
9  *
10  * Zuble is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23  *
24 */
25 
26 #ifndef ZBLEXCEPTION_H
27 #define ZBLEXCEPTION_H
28 
29 //#include <QObject>
30 #include "zblcore_global.h"
31 
32 //#include <glibmm/exception.h>
33 //#include <glibmm/ustring.h>
34 #include <QString>
35 #include <QException>
36 
37 namespace Zbl
38 {
39 
45 class ZBLCORESHARED_EXPORT ZblException : public QException
46 {
47 public:
48  ZblException( const QString& message );
49 
50  ZblException( const char* message );
51 
53  const QString& facility,
54  const QString& code,
55  const QString& message
56  );
57 
59  const char* facility,
60  const char* code,
61  const char* message
62  );
63 
64 
65  virtual ~ZblException( ) throw();
66 
67  static void rethrow( std::exception &e, const QString& message );
68 
69  void raise() const { throw *this; }
70  ZblException *clone() const { return new ZblException(*this); }
71 
72 
73  const char* what( ) const throw();
74  const QString& facility( ) const;
75  const QString& code( ) const;
76  const QString& message( ) const;
77 
78  bool matches(const QString& facility, const QString& code) const;
79 
80 private:
82 
83 };
84 
85 }
86 
87 #endif // ZBLEXCEPTION_H
#define ZBLCORESHARED_EXPORT
Definition: ZAndGate.cpp:6
Zuble&#39;s Qt Exception Object.
Definition: ZblException.h:45
ZblException * clone() const
Definition: ZblException.h:70