~pete-woods/storage-framework/cmake-extras-compatibility

« back to all changes in this revision

Viewing changes to include/unity/storage/qt/client/Exceptions.h

  • Committer: Bileto Bot
  • Date: 2016-09-09 02:35:47 UTC
  • mfrom: (8.1.57 merge-devel)
  • Revision ID: ci-train-bot@canonical.com-20160909023547-tfs5josfqweueja1
Merged devel at revision 64.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include <unity/storage/visibility.h>
22
22
 
 
23
#pragma GCC diagnostic push
 
24
#pragma GCC diagnostic ignored "-Wcast-align"
23
25
#include <QException>
 
26
#pragma GCC diagnostic pop
24
27
#include <QString>
25
28
 
26
29
namespace unity
46
49
 
47
50
    virtual char const* what() const noexcept override;
48
51
 
 
52
    QString error_message() const;
 
53
 
49
54
private:
50
55
    std::string what_string_;
51
56
    QString error_message_;
83
88
class UNITY_STORAGE_EXPORT DeletedException : public StorageException
84
89
{
85
90
public:
86
 
    DeletedException(QString const& error_message, QString const& identity_, QString const& name_);
 
91
    DeletedException(QString const& error_message, QString const& identity_);
87
92
    ~DeletedException();
88
93
 
89
94
    virtual DeletedException* clone() const override;
90
95
    virtual void raise() const override;
91
96
 
92
97
    QString native_identity() const;
93
 
    QString name() const;
94
98
 
95
99
private:
96
100
    QString identity_;
97
 
    QString name_;
98
101
};
99
102
 
100
103
/**
228
231
};
229
232
 
230
233
/**
231
 
\brief Indicates a system error, such as failure to to create a file or folder,
 
234
\brief Indicates a system error, such as failure to create a file or folder,
232
235
or any other (usually non-recoverable) kind of error that should not arise during normal operation.
233
236
*/
234
237
class UNITY_STORAGE_EXPORT ResourceException : public StorageException
235
238
{
236
239
public:
237
 
    ResourceException(QString const& error_message);
 
240
    ResourceException(QString const& error_message, int error_code);
238
241
    ~ResourceException();
239
242
 
240
243
    virtual ResourceException* clone() const override;
241
244
    virtual void raise() const override;
 
245
 
 
246
    int error_code() const noexcept;
 
247
 
 
248
private:
 
249
    int error_code_;
242
250
};
243
251
 
244
252
}  // namespace client