rendajs / Renda

A modern rendering engine for the web.
https://rendajs.org
MIT License
10 stars 4 forks source link

Sending a nonexistent message type should throw #926

Open jespertheend opened 4 months ago

jespertheend commented 4 months ago

When calling TypedMessenger.send.someNonexistentFunction() it should reject with an error indicating that the function doesn't exist.

jespertheend commented 4 months ago

On the other hand, sometimes not throwing might be desired. For instance, if an application wishes to notify another application (with an older version) about a change, it might be completely fine if that message type doesn't exist. Although in that case respond is probably set to false.