I’m working on a general way to catch all Ruby exceptions in one of my extensions, display an error message to the user and give them the ability to send an error report, similarly to how @thomthom has done in e.g. Solid Inspector.
I’m quite comfortable with where I need to rescue (on Procs called from menus and toolbars, on methods invoked by the Tool interface and for the code running when loading the extension) but struggle to formulate a rule in words for documentation purposes.
Could it be said these places are where the extension code “gets control”? Or maybe where SketchUp “hands control over” to the extension?
Maybe its simplest to refer to these places in the code as “where the extension is invoked”.
Background: I’ve been a professional software developer for 38 years. All three of the phrases you have listed are fine to me - they are common ways that programmers talk about software execution. To string some of those terms together, you might say “SketchUp transfers control to the extension’s code [or software] under various circumstances (loading, menu picks, etc.), which then executes [on the computer’s CPU core(s)].”
I don’t know of any “official” term either. I’ve just thought of them loosely as “entry points”.
Btw, if you look at TrueBend you’ll see something I’ve been doing recently, making wrappers around
UI::Command that also takes care of automatically forwarding all uncaught exceptions to the error reporter: https://github.com/thomthom/true-bend/blob/master/src/tt_truebend/command.rb
Saves me from repeating the same boiler plate. Unfortunately I’ve not found something similar for Observers and Tools. (Though for tools I’ve been playing with the idea of making a generic base class the encapsulate these standard boiler plate setups.)