Utils: Removed ErrnoException and implemented generic Exception base-class
[senf.git] / Utils / Logger / Target.hh
index d8ed8d1..cbb72c5 100644 (file)
@@ -1,8 +1,8 @@
 // $Id$
 //
-// Copyright (C) 2007 
-// Fraunhofer Institute for Open Communication Systems (FOKUS) 
-// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+// Copyright (C) 2007
+// Fraunhofer Institute for Open Communication Systems (FOKUS)
+// Competence Center NETwork research (NET), St. Augustin, GERMANY
 //     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
@@ -35,6 +35,7 @@
 #include "../mpl.hh"
 #include "StreamRegistry.hh"
 #include "AreaRegistry.hh"
+#include "../Exception.hh"
 
 //#include "Target.mpp"
 ///////////////////////////////hh.p////////////////////////////////////////
@@ -114,7 +115,7 @@ namespace log {
 
         The target may process in any arbitrary way: reformat, writing it into an SQL DB, whatever
         can be envisioned. However, there is one important limitation: The \c v_write call must not
-        block. So for more complex scenarios, additional measures must be taken (e.g. writing a log
+        block. So for more complex scenarios, additional measures must be taken (e.g. writing a %log
         backend daemon which receives the messages via UDP and processes them). Of course, in rare
         cases messages might be lost but this cannot be avoided.
 
@@ -205,9 +206,9 @@ namespace log {
                                              See the class description for information on the \a
                                              action and \a index parameters 
 
-                                             \param[in] Stream mandatory stream to match
-                                             \param[in] Area optional area to match
-                                             \param[in] Level optional level, matches messages with
+                                             \tparam Stream mandatory stream to match
+                                             \tparam Area optional area to match
+                                             \tparam Level optional level, matches messages with
                                                  at least the given level. 
                                              \param[in] action routing action to take
                                              \param[in] index position of new route in the routing
@@ -254,9 +255,9 @@ namespace log {
                                              found, it will be removed, otherwise the call will be
                                              ignored
 
-                                             \param[in] Stream mandatory stream to match
-                                             \param[in] Area optional area to match
-                                             \param[in] Level optional level, matches messages with
+                                             \tparam Stream mandatory stream to match
+                                             \tparam Area optional area to match
+                                             \tparam Level optional level, matches messages with
                                                  at least the given level. 
                                              \param[in] action routing action to take */
 
@@ -341,14 +342,14 @@ namespace log {
         ///\}
 
         /** \brief Exception: Invalid stream */
-        struct InvalidStreamException : public std::exception
-        { virtual char const * what() const throw() 
-                { return "senf::log::Target::InvalidStreamException"; } };
+        struct InvalidStreamException : public senf::Exception
+        { InvalidStreamException() 
+              : senf::Exception("senf::log::Target::InvalidStreamException"){} };
         
         /** \brief Exception: Invalid area */
-        struct InvalidAreaException : public std::exception
-        { virtual char const * what() const throw() 
-                { return "senf::log::Target::InvalidAreaException"; } };
+        struct InvalidAreaException : public senf::Exception
+        { InvalidAreaException() 
+              : senf::Exception("senf::log::Target::InvalidAreaException"){} };
 
         iterator begin() const;         ///< Iterator to beginning of routing table
         iterator end() const;           ///< Iterator past the end of routing table
@@ -373,9 +374,9 @@ namespace log {
                              std::string const & message) = 0;
                                         ///< Called to write out the routing message
                                         /**< This member must be defined in the derived class to
-                                             somehow format and write the log message. 
+                                             somehow format and write the %log message. 
 
-                                             Every log message always possesses a complete set of
+                                             Every %log message always possesses a complete set of
                                              meta information (\a stream, \a area and \a level).
 
                                              \note This member must \e not block since it may be