#739·EventBus

Why doesn't postSingleEvent throw an exception?

Author: MoYu-zcCreated Nov 9, 2025Updated Nov 30, 2025
Labelsquestion

Original title: postSingleEvent 为什么不抛出异常

Original message: 机器刚启动的时候,bean还没注册好,内部的处理 是打印一个错误日志、或者执行NoSubscriberEvent。这里为什么不直接抛出异常,是不是更符合业务场景? org.greenrobot.eventbus.EventBus#postSingleEvent

Translated message: When the machine first starts up, the beans haven't been registered yet. The internal handling is to print an error log or execute a NoSubscriberEvent. Why not just throw an exception directly? Wouldn't that be more in line with the business scenario? org.greenrobot.eventbus.EventBus#postSingleEvent