@verb #1619:"call" this none this rxdo #833 @program #1619:"call" this none this "this:call(module, verb, {args}, ?crashval)" "Call a verb on an installed module, passing it the given arguments. Special error handling is provided if this.debug is true: if the called verb raises an error, this.crashdata will be set to contain a helpful message; furthur, if crashval is supplied, it will be returned; otherwise the error will be re-raised." magic_cookie = "RE-RAISE ERROR" {module, verb, ?args = {}, ?crashval = magic_cookie} = args "This code calls semi-arbitrary verbs. The following acts as a perm check (if I'm not a wizard), or as neutralization, if I am:" set_task_perms(caller_perms()) module in this.modules || raise(E_INVARG) "Don't want to provide a way to crack caller == this checks." module != this || raise(E_PERM) if (this.debug) return module:(verb)(@args) endif try return module:(verb)(@args) except x (ANY) {code, message, value, traceback} = x this.crashdata = {this:osname() + ": an malfunction has occurred. Please reset this device.", "While calling " + module:nn() + ":" + verb + "(" + $su:from_value(args) + "):", @$code_utils:tb(traceback, message, code)} "Return requested default, or re-raise error." crashval == magic_cookie && raise(code, message, value) return crashval endtry .