summaryrefslogtreecommitdiffabout
path: root/include/opkele/exception.h
authorMichael Krelin <hacker@klever.net>2007-01-12 15:23:09 (UTC)
committer Michael Krelin <hacker@klever.net>2007-01-12 15:23:09 (UTC)
commitae41407817c5e360e57e06eba656a38b32093977 (patch) (unidiff)
treece24f86960a745f6e65eaca44a555ad2da7fcfd3 /include/opkele/exception.h
parent9caa31b962c42cf64ce03893ba616b135de12bbd (diff)
downloadlibopkele-ae41407817c5e360e57e06eba656a38b32093977.zip
libopkele-ae41407817c5e360e57e06eba656a38b32093977.tar.gz
libopkele-ae41407817c5e360e57e06eba656a38b32093977.tar.bz2
doxygen improvements
Diffstat (limited to 'include/opkele/exception.h') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opkele/exception.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/opkele/exception.h b/include/opkele/exception.h
index 9fc9bd3..0150e6b 100644
--- a/include/opkele/exception.h
+++ b/include/opkele/exception.h
@@ -8,99 +8,96 @@
8 8
9#include <curl/curl.h> 9#include <curl/curl.h>
10 10
11#include <opkele/opkele-config.h> 11#include <opkele/opkele-config.h>
12#ifdef OPKELE_HAVE_KONFORKA 12#ifdef OPKELE_HAVE_KONFORKA
13# include <konforka/exception.h> 13# include <konforka/exception.h>
14/** 14/**
15 * the exception parameters declaration 15 * the exception parameters declaration
16 */ 16 */
17# define OPKELE_E_PARS const string& fi,const string&fu,int l,const string& w 17# define OPKELE_E_PARS const string& fi,const string&fu,int l,const string& w
18/** 18/**
19 * the exception parameters list to pass to constructor 19 * the exception parameters list to pass to constructor
20 */ 20 */
21# define OPKELE_E_CONS_ fi,fu,l, 21# define OPKELE_E_CONS_ fi,fu,l,
22/** 22/**
23 * the exception codepoint specification 23 * the exception codepoint specification
24 */ 24 */
25# define OPKELE_CP_ CODEPOINT, 25# define OPKELE_CP_ CODEPOINT,
26/** 26/**
27 * the simple rethrow of konforka-based exception 27 * the simple rethrow of konforka-based exception
28 */ 28 */
29# define OPKELE_RETHROW catch(konforka::exception& e) { e.see(CODEPOINT); throw } 29# define OPKELE_RETHROW catch(konforka::exception& e) { e.see(CODEPOINT); throw }
30#else /* OPKELE_HAVE_KONFORKA */ 30#else /* OPKELE_HAVE_KONFORKA */
31# include <exception> 31# include <exception>
32# include <string> 32# include <string>
33/** 33/**
34 * the exception parameter declaration 34 * the exception parameter declaration
35 */ 35 */
36# define OPKELE_E_PARS const string& w 36# define OPKELE_E_PARS const string& w
37/** 37/**
38 * the dummy prefix for exception parameters list to prepend in the absence of 38 * the dummy prefix for exception parameters list to prepend in the absence of
39 * konforka library 39 * konforka library
40 */ 40 */
41# define OPKELE_E_CONS_ 41# define OPKELE_E_CONS_
42/** 42/**
43 * the dummy placeholder for konforka exception codepoint specification 43 * the dummy placeholder for konforka exception codepoint specification
44 */ 44 */
45# define OPKELE_CP_ 45# define OPKELE_CP_
46/** 46/**
47 * the dummy define for the konforka-based rethrow of exception 47 * the dummy define for the konforka-based rethrow of exception
48 */ 48 */
49# define OPKELE_RETHROW 49# define OPKELE_RETHROW
50#endif /* OPKELE_HAVE_KONFORKA */ 50#endif /* OPKELE_HAVE_KONFORKA */
51/** 51/**
52 * the exception parameters list to pass to constructor 52 * the exception parameters list to pass to constructor
53 */ 53 */
54# define OPKELE_E_CONS OPKELE_E_CONS_ w 54# define OPKELE_E_CONS OPKELE_E_CONS_ w
55 55
56/*
57 * @brief the main opkele namespace
58 */
59namespace opkele { 56namespace opkele {
60 using std::string; 57 using std::string;
61 58
62 /** 59 /**
63 * the base opkele exception class 60 * the base opkele exception class
64 */ 61 */
65 class exception : public 62 class exception : public
66# ifdef OPKELE_HAVE_KONFORKA 63# ifdef OPKELE_HAVE_KONFORKA
67 konforka::exception 64 konforka::exception
68# else 65# else
69 std::exception 66 std::exception
70# endif 67# endif
71 { 68 {
72 public: 69 public:
73# ifdef OPKELE_HAVE_KONFORKA 70# ifdef OPKELE_HAVE_KONFORKA
74 explicit 71 explicit
75 exception(const string& fi,const string& fu,int l,const string& w) 72 exception(const string& fi,const string& fu,int l,const string& w)
76 : konforka::exception(fi,fu,l,w) { } 73 : konforka::exception(fi,fu,l,w) { }
77# else /* OPKELE_HAVE_KONFORKA */ 74# else /* OPKELE_HAVE_KONFORKA */
78 string _what; 75 string _what;
79 explicit 76 explicit
80 exception(const string& w) 77 exception(const string& w)
81 : _what(w) { } 78 : _what(w) { }
82 virtual ~exception() throw(); 79 virtual ~exception() throw();
83 virtual const char * what() const throw(); 80 virtual const char * what() const throw();
84# endif /* OPKELE_HAVE_KONFORKA */ 81# endif /* OPKELE_HAVE_KONFORKA */
85 }; 82 };
86 83
87 /** 84 /**
88 * thrown in case of failed conversion 85 * thrown in case of failed conversion
89 */ 86 */
90 class failed_conversion : public exception { 87 class failed_conversion : public exception {
91 public: 88 public:
92 failed_conversion(OPKELE_E_PARS) 89 failed_conversion(OPKELE_E_PARS)
93 : exception(OPKELE_E_CONS) { } 90 : exception(OPKELE_E_CONS) { }
94 }; 91 };
95 /** 92 /**
96 * thrown in case of failed lookup (either parameter or persistent store) 93 * thrown in case of failed lookup (either parameter or persistent store)
97 */ 94 */
98 class failed_lookup : public exception { 95 class failed_lookup : public exception {
99 public: 96 public:
100 failed_lookup(OPKELE_E_PARS) 97 failed_lookup(OPKELE_E_PARS)
101 : exception(OPKELE_E_CONS) { } 98 : exception(OPKELE_E_CONS) { }
102 }; 99 };
103 /** 100 /**
104 * thrown in case of bad input (either local or network) 101 * thrown in case of bad input (either local or network)
105 */ 102 */
106 class bad_input : public exception { 103 class bad_input : public exception {