Skip to content

Commit

Permalink
More detailed message in case of libevent self-debugging failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
darkk authored and nmathewson committed Oct 20, 2011
1 parent 5e42202 commit 9e6a4ef
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions event.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,10 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
dent->added = 1; \
} else { \
event_errx(_EVENT_ERR_ABORT, \
"%s: noting an add on a non-setup event %p", \
__func__, (ev)); \
"%s: noting an add on a non-setup event %p" \
" (events: 0x%x, fd: %d, flags: 0x%x)", \
__func__, (ev), (ev)->ev_events, \
(ev)->ev_fd, (ev)->ev_flags); \
} \
EVLOCK_UNLOCK(_event_debug_map_lock, 0); \
} \
Expand All @@ -257,8 +259,10 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
dent->added = 0; \
} else { \
event_errx(_EVENT_ERR_ABORT, \
"%s: noting a del on a non-setup event %p", \
__func__, (ev)); \
"%s: noting a del on a non-setup event %p" \
" (events: 0x%x, fd: %d, flags: 0x%x)", \
__func__, (ev), (ev)->ev_events, \
(ev)->ev_fd, (ev)->ev_flags); \
} \
EVLOCK_UNLOCK(_event_debug_map_lock, 0); \
} \
Expand All @@ -273,8 +277,10 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
if (!dent) { \
event_errx(_EVENT_ERR_ABORT, \
"%s called on a non-initialized event %p", \
__func__, (ev)); \
"%s called on a non-initialized event %p" \
" (events: 0x%x, fd: %d, flags: 0x%x)", \
__func__, (ev), (ev)->ev_events, \
(ev)->ev_fd, (ev)->ev_flags); \
} \
EVLOCK_UNLOCK(_event_debug_map_lock, 0); \
} \
Expand All @@ -289,8 +295,10 @@ HT_GENERATE(event_debug_map, event_debug_entry, node, hash_debug_entry,
dent = HT_FIND(event_debug_map, &global_debug_map, &find); \
if (dent && dent->added) { \
event_errx(_EVENT_ERR_ABORT, \
"%s called on an already added event %p", \
__func__, (ev)); \
"%s called on an already added event %p" \
" (events: 0x%x, fd: %d, flags: 0x%x)", \
__func__, (ev), (ev)->ev_events, \
(ev)->ev_fd, (ev)->ev_flags); \
} \
EVLOCK_UNLOCK(_event_debug_map_lock, 0); \
} \
Expand Down

0 comments on commit 9e6a4ef

Please sign in to comment.