callback (public)

 callback [ -catch ] [ -impl impl ] callback [ args... ]

Defined in packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl

Invoke the registered callback implementations for the given callback. The callbacks terminate on error unless -catch is provided. The value returned by the callback function is determined by the return codes from the callback implementations.

The callbacks are executed one level below the calling function so passing arrays to a callback can be done normally via

upvar arrayname $arrayref

The return codes returned from the implementation are treated as follows:

return -code ok or "return"
With a plain return, a nonempty return value will be lappended to the list of returns from the callback function
return -code error or "error"
errors will simply propagate (and no value returned) unless -catch is specified in which case the callback processing will continue but no value will be appended to the return list for the implementation which returned an error.
return -code return
Takes the return value if the implementation returning -code return and returns a one element list with that return value. Note that this means if you have code which returns return -code return {x y}, you will get {{x y}} as the return value from the callback. This is done in order to unambiguously distinguish a pair of callbacks returning x and y respectively from this single callback.
return -code break
return the current list of returned values including this implementations return value if nonempty
return -code continue
Continue processing, ignore the return value from this implementation

Switches:
-catch
(boolean) (optional)
if catch specified errors in the callback will be caught, tracebacks logged as errors to the server log, but other callbacks called and the list of returns still returned. If not given an error simply is passed further on.
-impl
(defaults to "*") (optional)
invoke a specific implementation rather than all implementations of the given callback
Parameters:
callback - the callback name without leading or trailing ::
Returns:
list of the returns from each callback that does a normal (nonempty) return
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_ad_proc_create_callback ad_proc_create_callback (test acs-tcl) callback callback test_ad_proc_create_callback->callback test_ad_proc_fire_callback ad_proc_fire_callback (test acs-tcl) test_ad_proc_fire_callback->callback ad_print_stack_trace ad_print_stack_trace (public) callback->ad_print_stack_trace Class ::ms::Graph Class ::ms::Graph (public) Class ::ms::Graph->callback acs_mail_lite::inbound_queue_pull acs_mail_lite::inbound_queue_pull (private) acs_mail_lite::inbound_queue_pull->callback acs_mail_lite::load_mails acs_mail_lite::load_mails (public, deprecated) acs_mail_lite::load_mails->callback acs_mail_lite::send_immediately acs_mail_lite::send_immediately (private) acs_mail_lite::send_immediately->callback calendar::item::delete calendar::item::delete (public) calendar::item::delete->callback

Testcases:
ad_proc_create_callback, ad_proc_fire_callback
[ show source ]
Show another procedure: