refs #297 Added CStatusException, a throwable exception class containing a CStatusMessage.

This commit is contained in:
Mathew Sutcliffe
2015-06-21 19:08:07 +01:00
parent 55049537a9
commit 2aef4a2881
3 changed files with 78 additions and 0 deletions

View File

@@ -21,6 +21,8 @@
namespace BlackMisc
{
class CStatusException;
/*!
* Streamable status message, e.g. from Core -> GUI
*/
@@ -68,6 +70,12 @@ namespace BlackMisc
//! \sa QtMessageHandler
void toQtLogTriple(QtMsgType *o_type, QString *o_category, QString *o_message) const;
//! Return a throwable exception object containing this status message.
CStatusException asException() const;
//! If message is empty then do nothing, otherwise throw a CStatusException.
void maybeThrow() const;
//! Message category
const CLogCategoryList &getCategories() const { return this->m_categories; }