KSquare Utilities
KKException.h
Go to the documentation of this file.
1 /* KKException.cpp -- Base class to be used for exception handling.
2  * Copyright (C) 1994-2014 Kurt Kramer
3  * For conditions of distribution and use, see copyright notice in KKB.h
4  */
5 #ifndef _KKEXCEPTION_
6 #define _KKEXCEPTION_
7 
8 #include <ostream>
9 #include <string>
10 
11 #ifdef WIN32
12 #else
13 #define __cdecl
14 #endif
15 
16 #include "KKBaseTypes.h"
17 #include "KKQueue.h"
18 #include "KKStr.h"
19 
20 #define EnterChar 13
21 #define EscapeChar 27
22 
23 
24 namespace KKB
25 {
26 
27  class KKException: public std::exception
28  {
29  public:
30  KKException ();
31 
32  KKException (const KKException& _exception);
33 
34  KKException (const KKStr& _exceptionStr);
35 
36  KKException (const char* _exceptionStr);
37 
38  KKException (const KKStr& _exceptionStr,
39  const std::exception& _innerException
40  );
41 
42  KKException (const char* _exceptionStr,
43  const std::exception& _innerException
44  );
45 
46  KKException (const char* _exceptionStr,
47  const KKException& _innerException
48  );
49 
50  KKException (const KKStr& _exceptionStr,
51  const KKException& _innerException
52  );
53 
54  virtual ~KKException () throw ();
55 
56  virtual const KKStr& ToString () const;
57 
58  virtual const char* what () const throw ();
59 
60 
61  private:
62  KKStr exceptionStr;
63  }; /* KKException */
64 
65 } /* namespace KKB; */
66 
67 #endif
KKException(const char *_exceptionStr, const KKException &_innerException)
Definition: KKException.cpp:74
virtual ~KKException()
Definition: KKException.cpp:93
KKException(const KKStr &_exceptionStr, const KKException &_innerException)
Definition: KKException.cpp:83
virtual const char * what() const
KKException(const char *_exceptionStr, const std::exception &_innerException)
Definition: KKException.cpp:64
KKException(const KKStr &_exceptionStr, const std::exception &_innerException)
Definition: KKException.cpp:52
KKTHread * KKTHreadPtr
KKException(const KKException &_exception)
Definition: KKException.cpp:31
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of &#39;std::string&#39; strings.
Definition: KKStr.cpp:1082
KKException(const char *_exceptionStr)
Definition: KKException.cpp:38
KKException(const KKStr &_exceptionStr)
Definition: KKException.cpp:45
virtual const KKStr & ToString() const
Definition: KKException.cpp:98