X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Ferror.h;h=d030c41c12937e1a3846ce819c445cd2b953e308;hp=1f9662e274b1d9b087d9cb16e5c1cf30f8c6811b;hb=d61b4678e4e4a2a3661a2472dc7349cc9fd5eaad;hpb=521cf1db00f8ce2d9f9494dca503d6c17d89ac2f diff --git a/source/core/error.h b/source/core/error.h index 1f9662e..d030c41 100644 --- a/source/core/error.h +++ b/source/core/error.h @@ -9,7 +9,7 @@ Distributed under the LGPL #include #include -#include "backtrace.h" +#include "../debug/backtrace.h" namespace Msp { @@ -23,10 +23,10 @@ public: ~Exception() throw() { } const char *what() const throw() { return w.c_str(); } - const Backtrace &get_backtrace() const throw() { return bt; } + const Debug::Backtrace &get_backtrace() const throw() { return bt; } private: std::string w; - Backtrace bt; + Debug::Backtrace bt; }; @@ -39,6 +39,15 @@ public: InvalidParameterValue(const std::string &w_): Exception(w_) { } }; +/** +Thrown when a lookup from a map fails. +*/ +class KeyError: public Exception +{ +public: + KeyError(const std::string &w_): Exception(w_) { } +}; + /** Thrown when the current object state doesn't allow the requested action. */