I noted the following on tcl-mac: Using 8.4.15, I've noticed that if my ::tk::mac::ShowPreferences routine throws an error, it isn't handled by bgerror; it's simply swallowed with no evidence. It was quite puzzling until I figured out what was going on.
So: is this expected behavior? Do the other ::tk::mac handlers have the same behavior? And is there any reason why errors in these routines shouldn't be handed to bgerror?
Daniel Steffen responded:
all the tk::mac handlers currently use Tcl_GlobalEval() resp
Tcl_EvalEx() and ignore the returned result, it would not be difficult
to add error propagation via [bgerror], all that is missing is a call
to Tcl_BackgroundError() in case of error return.
Please file a bug to remind me to have look at this.