2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-10-17 14:26:31 +00:00

[master] Add explicit exception what strings

This should fix the unit tests complaining about wrong error messages.

While debugging, I also found an uninitialized value error that has been present probably since the logger code exists. This has also been fixed.
This commit is contained in:
Jelte Jansen
2012-05-03 17:32:31 +02:00
parent 7b0e7e1746
commit 3a9c1b6387
5 changed files with 72 additions and 38 deletions

View File

@@ -207,6 +207,28 @@ public:
throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2); \
} while (1)
///
/// Similar as isc_throw, but allows the exception to have three additional
/// parameters (the stream/text goes first)
#define isc_throw_3(type, stream, param1, param2, param3) \
do { \
std::ostringstream oss__; \
oss__ << stream; \
throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2,\
param3); \
} while (1)
///
/// Similar as isc_throw, but allows the exception to have four additional
/// parameters (the stream/text goes first)
#define isc_throw_4(type, stream, param1, param2, param3, param4) \
do { \
std::ostringstream oss__; \
oss__ << stream; \
throw type(__FILE__, __LINE__, oss__.str().c_str(), param1, param2,\
param3, param4); \
} while (1)
}
#endif // __EXCEPTIONS_H