mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
refs #297 Added CStatusException, a throwable exception class containing a CStatusMessage.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "statusmessage.h"
|
||||
#include "statusexception.h"
|
||||
#include "blackmiscfreefunctions.h"
|
||||
#include "propertyindex.h"
|
||||
#include "iconlist.h"
|
||||
@@ -91,6 +92,19 @@ namespace BlackMisc
|
||||
}
|
||||
}
|
||||
|
||||
CStatusException CStatusMessage::asException() const
|
||||
{
|
||||
return CStatusException(*this);
|
||||
}
|
||||
|
||||
void CStatusMessage::maybeThrow() const
|
||||
{
|
||||
if (! this->isEmpty())
|
||||
{
|
||||
throw this->asException();
|
||||
}
|
||||
}
|
||||
|
||||
QString CStatusMessage::getHumanReadableCategory() const
|
||||
{
|
||||
if (this->m_humanReadableCategory.isEmpty())
|
||||
|
||||
Reference in New Issue
Block a user