From: Leandro Lucarella Date: Mon, 29 Jan 2007 00:44:37 +0000 (+0000) Subject: Excuses about not throwing an exception on dispatcher's dispatch() and exit(). X-Git-Tag: 0.2~6 X-Git-Url: https://git.llucax.com/software/eventxx.git/commitdiff_plain/5045f64d1368539ae567ff2d10ec761983afe3e5?ds=sidebyside Excuses about not throwing an exception on dispatcher's dispatch() and exit(). 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. --- diff --git a/eventxx b/eventxx index 8600794..5c05bc6 100644 --- 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,