Skip to content

Commit

Permalink
improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Nov 7, 2024
1 parent c1a4971 commit 470164b
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions source/event_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,9 @@ struct aws_event_loop *aws_event_loop_new_dispatch_queue_with_options(
const struct aws_event_loop_options *options) {
(void)alloc;
(void)options;
AWS_ASSERT("Dispatch Queue is not supported on the platform" == NULL);
AWS_ASSERT(0);

AWS_LOGF_DEBUG(AWS_LS_IO_EVENT_LOOP, "Dispatch Queue is not supported on the platform");
return NULL;
}
#endif // AWS_ENABLE_DISPATCH_QUEUE
Expand All @@ -610,7 +612,9 @@ struct aws_event_loop *aws_event_loop_new_iocp_with_options(
const struct aws_event_loop_options *options) {
(void)alloc;
(void)options;
AWS_ASSERT("IOCP is not supported on the platform" == NULL);
AWS_ASSERT(0);

AWS_LOGF_DEBUG(AWS_LS_IO_EVENT_LOOP, "IOCP is not supported on the platform");
return NULL;
}
#endif // AWS_ENABLE_IO_COMPLETION_PORTS
Expand All @@ -621,7 +625,9 @@ struct aws_event_loop *aws_event_loop_new_kqueue_with_options(
const struct aws_event_loop_options *options) {
(void)alloc;
(void)options;
AWS_ASSERT("Kqueue is not supported on the platform" == NULL);
AWS_ASSERT(0);

AWS_LOGF_DEBUG(AWS_LS_IO_EVENT_LOOP, "Kqueue is not supported on the platform");
return NULL;
}
#endif // AWS_ENABLE_EPOLL
Expand All @@ -632,7 +638,9 @@ struct aws_event_loop *aws_event_loop_new_epoll_with_options(
const struct aws_event_loop_options *options) {
(void)alloc;
(void)options;
AWS_ASSERT("Epoll is not supported on the platform" == NULL);
AWS_ASSERT(0);

AWS_LOGF_DEBUG(AWS_LS_IO_EVENT_LOOP, "Epoll is not supported on the platform");
return NULL;
}
#endif // AWS_ENABLE_KQUEUE

0 comments on commit 470164b

Please sign in to comment.