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
ZblError.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  * ZblError.h
6  *
7  * Created on: Feb 3, 2013
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 ZBLERROR_H
27 #define ZBLERROR_H
28 
29 #include "zblcore_global.h"
30 #include <QString>
31 
32 namespace Zbl
33 {
34 
35 class ZblThreadErr;
36 
42 {
43  friend class ZblThreadErr;
44 public:
45  ZblError();
46 
47  ZblError(const ZblError& err);
48 
49 
50  const QString& facility() const;
51  const QString& code() const;
52  const QString& message() const;
53  const QString description() const;
54  bool isError() const;
55  bool isOK() const;
56 
57 private:
58 
59  void set(
60  const QString& facility,
61  const QString& code,
62  const QString& message
63  );
64 
65  void set(
66  const char* facility,
67  const char* code,
68  const char* message
69  );
70 
71  void clear();
72 
73  QString m_facility;
74  QString m_code;
75  QString m_message;
76 
77  static const QString m_defaultFacility;
78  static const QString m_defaultCode;
79  static const QString m_defaultMessage;
80 
81  bool m_hasError;
82 
83 };
84 
85 } // Zbl
86 
87 #endif // ZBLERROR_H
#define ZBLCORESHARED_EXPORT
bool m_hasError
Definition: ZblError.h:81
static const QString m_defaultFacility
Definition: ZblError.h:77
A class to manage Zuble&#39;s thread-specific state. This includes error propagation and thread abort han...
Definition: ZblThreadErr.h:87
Definition: ZAndGate.cpp:6
QString m_code
Definition: ZblError.h:74
static const QString m_defaultMessage
Definition: ZblError.h:79
Data object for thread local error status information.
Definition: ZblError.h:41
QString m_message
Definition: ZblError.h:75
QString m_facility
Definition: ZblError.h:73
static const QString m_defaultCode
Definition: ZblError.h:78