ui-gxmlcpp  1.4.4
Exception.hpp
Go to the documentation of this file.
1 
10 #ifndef UI_GXML_EXCEPTION_HPP
11 #define UI_GXML_EXCEPTION_HPP
12 
13 // STDC++
14 #include <string>
15 
16 // C++ libraries
17 #include <ui-utilcpp/Exception.hpp>
18 
19 namespace UI {
20 namespace GXML {
21 
23 class Exception: public UI::Exception
24 {
25 public:
26  Exception(std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_)
27  :UI::Exception(what, debug)
28  {}
29  virtual ~Exception() throw() {};
30 };
31 
33 template <typename Code = int>
34 class CodeException: public Exception
35 {
36 public:
38  CodeException(Code const & code, std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_)
39  :UI::GXML::Exception(what, debug)
40  ,code_(code)
41  {};
42 
44  Code const & getCode() const { return code_; }
45 
46 private:
47  Code const code_;
48 };
49 
50 }}
51 #endif
Namespace for all Schlund+Partner Code.
Definition: Buffer.cpp:30
Adding code facility to Exception.
Definition: Exception.hpp:34
Mother exception class for this namespace.
Definition: Exception.hpp:23
CodeException(Code const &code, std::string const &what=NoWhatGiven_, std::string const &debug=NoDebugGiven_)
Construct with code and description text.
Definition: Exception.hpp:38
Code const & getCode() const
Get code.
Definition: Exception.hpp:44