diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-01-09 05:03:10 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-01-09 05:03:10 +0100 |
commit | 8ecfc19a5fff07065d893145b55921752754a708 (patch) | |
tree | a3e1cd1ab796bead20ce35f7ffe20232090ca6df /includes/Exceptions.h | |
parent | 4e4e10fdfe9f2e43c2fbb875422e5b658bd8d0b7 (diff) |
Disabling generating traces for task switches, and adding a move constructor for exceptions.
Diffstat (limited to 'includes/Exceptions.h')
-rw-r--r-- | includes/Exceptions.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/Exceptions.h b/includes/Exceptions.h index d7856fe..5cdb232 100644 --- a/includes/Exceptions.h +++ b/includes/Exceptions.h @@ -10,9 +10,10 @@ namespace Balau { class GeneralException { public: - GeneralException(const char * msg, const char * details = NULL) : m_msg(::strdup(msg)) { setDetails(details); genTrace(); } - GeneralException(const String & msg, const char * details = NULL) : m_msg(msg.strdup()) { setDetails(details); genTrace(); } + GeneralException(const char * msg, const char * details = NULL, bool notrace = false) : m_msg(::strdup(msg)) { setDetails(details); if (!notrace) genTrace(); } + GeneralException(const String & msg, const char * details = NULL, bool notrace = false) : m_msg(msg.strdup()) { setDetails(details); if (!notrace) genTrace(); } GeneralException(const GeneralException & e) : m_msg(strdup(e.m_msg)), m_trace(e.m_trace) { setDetails(e.m_details); } + GeneralException(GeneralException && e) : m_msg(e.m_msg), m_trace(e.m_trace), m_details(e.m_details) { e.m_msg = e.m_details = NULL; } ~GeneralException() { if (m_msg) free(m_msg); } const char * getMsg() const { return m_msg; } const char * getDetails() const { return m_details; } |