~unity-api-team/storage-framework/vivid

« back to all changes in this revision

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

  • Committer: Michi Henning
  • Date: 2016-05-23 02:27:16 UTC
  • mto: (8.12.2 add-etag)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: michi.henning@canonical.com-20160523022716-jpaudmuan8vxxgch
More fleshing out of the local client implementation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#pragma once
2
2
 
 
3
#include <unity/storage/common/visibility.h>
 
4
 
3
5
#include <QException>
4
6
 
5
7
namespace unity
14
16
/**
15
17
\brief Base exception class for all exceptions returned by the API.
16
18
*/
17
 
class StorageException : public QException
 
19
class UNITY_STORAGE_EXPORT StorageException : public QException
18
20
{
19
21
public:
20
22
    StorageException();
27
29
/**
28
30
\brief Indicates errors in the communication with the storage provider service.
29
31
*/
30
 
class LocalCommsException : public StorageException
 
32
class UNITY_STORAGE_EXPORT LocalCommsException : public StorageException
31
33
{
32
34
public:
33
35
    LocalCommsException();
40
42
/**
41
43
\brief Indicates errors in the communication between the storage provider and the cloud service.
42
44
*/
43
 
class RemoteCommsException : public StorageException
 
45
class UNITY_STORAGE_EXPORT RemoteCommsException : public StorageException
44
46
{
45
47
public:
46
48
    RemoteCommsException();
53
55
/**
54
56
\brief Indicates that the caller invoked an operation on an item that was destroyed.
55
57
*/
56
 
class DestroyedException : public StorageException
 
58
class UNITY_STORAGE_EXPORT DestroyedException : public StorageException
57
59
{
58
60
public:
59
61
    DestroyedException();
63
65
    virtual void raise() const override;
64
66
};
65
67
 
 
68
/**
 
69
\brief Indicates that the caller destroyed the runtime.
 
70
*/
 
71
class UNITY_STORAGE_EXPORT RuntimeDestroyedException : public StorageException
 
72
{
 
73
public:
 
74
    RuntimeDestroyedException();
 
75
    ~RuntimeDestroyedException();
 
76
 
 
77
    virtual RuntimeDestroyedException* clone() const override;
 
78
    virtual void raise() const override;
 
79
};
 
80
 
 
81
/**
 
82
\brief Indicates that an item does not exist.
 
83
*/
 
84
class UNITY_STORAGE_EXPORT NotExistException : public StorageException
 
85
{
 
86
public:
 
87
    NotExistException();
 
88
    ~NotExistException();
 
89
 
 
90
    virtual NotExistException* clone() const override;
 
91
    virtual void raise() const override;
 
92
};
 
93
 
66
94
}  // namespace client
67
95
}  // namespace qt
68
96
}  // namespace storage