]> git.llucax.com Git - software/eventxx.git/commitdiff
Excuses about not throwing an exception on dispatcher's dispatch() and exit().
authorLeandro Lucarella <llucax+eventxx@gmail.com>
Mon, 29 Jan 2007 00:44:37 +0000 (00:44 +0000)
committerLeandro Lucarella <llucax+eventxx@gmail.com>
Mon, 29 Jan 2007 00:44:37 +0000 (00:44 +0000)
Since libevent don't specify very clearly when and what event_dispatch() and
event_exitloop() returns errors, I cannot specify precisely the exceptions to
throw, so the user must manage the error codes returned by itselfs until
libevent gets documented.

eventxx

diff --git a/eventxx b/eventxx
index 8600794175e059ee7e4b920890e9979ac9a78f80..5c05bc658138bd4abb021ecf4d66873ed4bdacf1 100644 (file)
--- a/eventxx
+++ b/eventxx
@@ -920,8 +920,11 @@ struct dispatcher
         * @param flags If eventxx::ONCE is specified, then just one event is
         *              processed, if eventxx::NONBLOCK is specified, then this
         *              function returns even if there are no pending events.
+        *
+        * @return Not very well specified by @libevent :-/ that's why it
+        *         doesn't throw an exception either.
         */
-       int dispatch(int flags = 0) // TODO  throw(exception)
+       int dispatch(int flags = 0) throw() // TODO  throw(exception)
        {
                return internal::event_base_loop(_event_base, flags);
        }
@@ -931,8 +934,11 @@ struct dispatcher
         *
         * @param to If a timeout is given, the loop exits after the specified
         *           time is elapsed.
+        *
+        * @return Not very well specified by @libevent :-/ that's why it
+        *         doesn't throw an exception either.
         */
-       int exit(const time& to = time())
+       int exit(const time& to = time()) throw() // TODO  throw(exception)
        {
                // XXX HACK libevent don't use const
                return internal::event_base_loopexit(_event_base,