"catch" wrapper (commit 0ecff30a328993179b757a13830a1a5249839dd8)

René J.V. Bertin rjvbertin at gmail.com
Mon Nov 28 10:05:04 CET 2016


Hi,

Looking at upgrading my MacPorts base I noticed this tidbit in the commit 0ecff30a328993179b757a13830a1a5249839dd8 message:

The new catch command
> can't simply be aliased in to the slaves like we
>     normally do for shared commands because it uses uplevel and aliases add
>     an extra call level.

Does this mean that every expression in every Portfile or PortGroup that uses catch has to be verified and possibly rewritten to handle the extra call level?
I see that the native catch is available as "builtin_catch"; is there any way of knowing when the wrapper is required because the caught expression can raise signals, i.e. when those Tclx signal handlers can come into action during evaluation of an expression and when the can't?

PS: native_catch would have been a bit less ambiguous than builtin_catch IMHO, if it's a command that is not off-limits to us poor mere mortals of course.

Thanks,
René


More information about the macports-dev mailing list