I agree, logging events would be a good solution for this use case. On Fri, Apr 15, 2016 at 10:13 PM, Andrew Stitcher <[email protected]> wrote:
> On Fri, 2016-04-15 at 19:29 +0200, Alexandre Trufanow wrote: > > The changes look good overall, removing the event class makes the > > handler's > > API much cleaner IMO. > > I found the on_unhandled callback very useful for testing/debugging, > > when I > > didn't know what event to expect for my unit tests. Do you think > > there > > could be another way of setting a catchall for events? > > We considered this when deciding to remove on_unhandled - the problem > is that after removing event there was no way to make on_unhandled at > all useful. > > So we'd need some other way to handle this, a possibility would be to > add logging to the empty default handlers, which logs that the specific > handler hasn't been called but not overridden. As the C++ library has > no logging infrastructure at the moment, we'd have to add this first. > > Note though that in many applications you will expect to call empty > handlers a lot, so that logging every unhandled event might be > overkill. > > I agree with Justin that it will be very useful to log the events at > source in any case. > > Andrew > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
