I think events can be thrown, but it's incompetent coding if you actually do.
Let me explain. In C++ you can throw any type. You can throw booleans. You can throw enum error_type
. You can throw std::exception
. And of course you can throw struct XEvent
.
But you most likely are doing something either horribly wrong or horribly confusing (and thus wrong) if you actually do.
I'm all for not overloading the meanings of words, to avoid ambiguity (where it doesn't need to exist).
I think "throw" is commonly understood to imply call stack unwinding (for when you have a well-defined stack, but I think it can be extended to a singly linked list of unbounded in-degree; that is, a tree of parent pointers). Let's stick to that.
The word "raise" is used for signals as well. It'd be nice if it's possible to avoid using this for events too.
I prefer "fired" for when the event happens ("the onMouseOver event just fired"), and maybe "was signalled" when the event listener notifies the consumer ("the XMouseMotionNotify event was signalled to the client").