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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user