Exception.hpp
Go to the documentation of this file.
#ifndef UI_GXML_EXCEPTION_HPP
#define UI_GXML_EXCEPTION_HPP
// STDC++
#include <string>
// C++ libraries
#include <ui-utilcpp/Exception.hpp>
namespace UI {
namespace GXML {
class Exception: public UI::Exception
{
public:
Exception(std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_)
:UI::Exception(what, debug)
{}
virtual ~Exception() throw() {};
};
template <typename Code = int>
class CodeException: public Exception
{
public:
CodeException(Code const & code, std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_)
:UI::GXML::Exception(what, debug)
,code_(code)
{};
Code const & getCode() const { return code_; }
private:
Code const code_;
};
}}
#endif
UI::GXML::CodeException
Adding code facility to Exception.
Definition Exception.hpp:35
UI::GXML::CodeException::getCode
Code const & getCode() const
Get code.
Definition Exception.hpp:44
UI::GXML::CodeException::CodeException
CodeException(Code const &code, std::string const &what=NoWhatGiven_, std::string const &debug=NoDebugGiven_)
Construct with code and description text.
Definition Exception.hpp:38
UI::GXML::Exception
Mother exception class for this namespace.
Definition Exception.hpp:24
UI
Namespace for all Schlund+Partner Code.
Definition Buffer.cpp:30