~michihenning/storage-framework/increase-timeout

« back to all changes in this revision

Viewing changes to src/qt/client/Exceptions.cpp

  • Committer: Michi Henning
  • Date: 2016-08-10 06:45:41 UTC
  • mfrom: (10.10.15 more-coverage)
  • Revision ID: michi.henning@canonical.com-20160810064541-ty9vzh6dff8jgfpw
Merged lp:~michihenning/storage-framework/more-coverage:
Improved coverage. Better error reporting/handling.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    return what_string_.c_str();
43
43
}
44
44
 
 
45
QString StorageException::error_message() const
 
46
{
 
47
    return error_message_;
 
48
}
 
49
 
45
50
LocalCommsException::LocalCommsException(QString const& error_message)
46
51
    : StorageException("LocalCommsException", error_message)
47
52
{
76
81
    throw *this;
77
82
}
78
83
 
79
 
DeletedException::DeletedException(QString const& error_message, QString const& identity, QString const& name)
 
84
DeletedException::DeletedException(QString const& error_message, QString const& identity)
80
85
    : StorageException("DeletedException", error_message)
81
86
    , identity_(identity)
82
 
    , name_(name)
83
87
{
84
88
}
85
89
 
100
104
    return identity_;
101
105
}
102
106
 
103
 
QString DeletedException::name() const
104
 
{
105
 
    return name_;
106
 
}
107
 
 
108
107
RuntimeDestroyedException::RuntimeDestroyedException(QString const& method)
109
108
    : StorageException("RuntimeDestroyedException", method + ": Runtime was destroyed previously")
110
109
{
276
275
    throw *this;
277
276
}
278
277
 
279
 
ResourceException::ResourceException(QString const& error_message)
 
278
ResourceException::ResourceException(QString const& error_message, int error_code)
280
279
    : StorageException("ResourceException", error_message)
 
280
    , error_code_(error_code)
281
281
{
282
282
}
283
283
 
293
293
    throw *this;
294
294
}
295
295
 
 
296
int ResourceException::error_code() const noexcept
 
297
{
 
298
    return error_code_;
 
299
}
 
300
 
296
301
}  // namespace client
297
302
}  // namespace qt
298
303
}  // namespace storage