Currently C# Messenger Extended (on the wiki) seems to handle errors, such as event listeners not existing to a broadcast, very poorly… it actually stops execution of the code being ran, similar to how Unity deals with null references. I don’t understand why the original creator left it that way, but I’d definitely like it to continue execution of code regardless if there are listeners are not.
Is there a version of the messenger system that deals with these errors better?
Example:
void Function ()
{
DoSomething(); // Ran
Messenger.Broadcast("My Message"); // No Listener
DoSomethingAgain(); // Will not run because there was no listener and code stopped executing.
}
Edit:
I cracked open the file to find a solution, and found that you can set a broadcast to not require a listener. It still seems that the code shouldn’t prevent execution if this option isn’t set, but this is good enough to work with.