|
@@ -99,6 +99,17 @@ public:
|
|
|
{}
|
|
|
};
|
|
|
|
|
|
+/// \brief Bad Interprocess Sync
|
|
|
+///
|
|
|
+/// Exception thrown if a bad InterprocessSync object (such as NULL) is
|
|
|
+/// used.
|
|
|
+class BadInterprocessSync : public isc::Exception {
|
|
|
+public:
|
|
|
+ BadInterprocessSync(const char* file, size_t line, const char* what) :
|
|
|
+ isc::Exception(file, line, what)
|
|
|
+ {}
|
|
|
+};
|
|
|
+
|
|
|
/// \brief Logger Class
|
|
|
///
|
|
|
/// This class is the main class used for logging. Use comprises:
|
|
@@ -240,15 +251,13 @@ public:
|
|
|
|
|
|
/// \brief Replace the interprocess synchronization object
|
|
|
///
|
|
|
- /// This method is exception-free. If this method is called with
|
|
|
- /// NULL as the argument, it does nothing and the old sync object is
|
|
|
- /// used as before.
|
|
|
+ /// If this method is called with NULL as the argument, it throws a
|
|
|
+ /// BadInterprocessSync exception.
|
|
|
///
|
|
|
/// \param sync The logger uses this synchronization object for
|
|
|
- /// synchronizing output of log messages. If NULL is passed, the old
|
|
|
- /// synchronization object is used as before. When a non-NULL sync
|
|
|
- /// object is passed, it should be deletable and the ownership is
|
|
|
- /// transferred to the logger.
|
|
|
+ /// synchronizing output of log messages. It should be deletable and
|
|
|
+ /// the ownership is transferred to the logger. If NULL is passed,
|
|
|
+ /// a BadInterprocessSync exception is thrown.
|
|
|
void setInterprocessSync(isc::util::InterprocessSync* sync);
|
|
|
|
|
|
/// \brief Equality
|