Unlike callouts a custom function can return values which need further processing. Some values may indicate error conditions, and it's also not necessarily so that exceptions should be logged using werror().
I can't see what's wrong in using
if (mixed err = catch { res = f(1, 2, 3, ...); }) werror(describe_backtrace(err));
directly? However, if you feel that qualifies as an addition in Function.pmod I won't stop you, but I won't use it either.
/ Jonas Walldén
Previous text:
2003-12-08 11:20: Subject: call_callback
And call_outs.
/ Mirar
Because the tenth time you write that code in a program, you get the naggin feeling that you're duplicating code...
/ Mirar
Previous text:
2003-12-08 11:32: Subject: call_callback
Unlike callouts a custom function can return values which need further processing. Some values may indicate error conditions, and it's also not necessarily so that exceptions should be logged using werror().
I can't see what's wrong in using
if (mixed err = catch { res = f(1, 2, 3, ...); }) werror(describe_backtrace(err));
directly? However, if you feel that qualifies as an addition in Function.pmod I won't stop you, but I won't use it either.
/ Jonas Walldén
Well, duplicating the same statement ten times is one extreme, and adding it to the Pike language framework is another. Somewhere in between there's a concept of user-level functions, right? :-)
/ Jonas Walldén
Previous text:
2003-12-08 11:34: Subject: call_callback
Because the tenth time you write that code in a program, you get the naggin feeling that you're duplicating code...
/ Mirar
Well, since I'm writing stuff for Pikes framework *anyway*, it seems silly to have for instance
Protocols.A_Protocol.Supportstuff.call_callback and Protocols.Another_Protocol.Supportstuff.call_callback and Some.Other.Library.With.Callbacks.Supportstuff.call_callback
that does exactly the same. ;)
/ Mirar
Previous text:
2003-12-08 11:40: Subject: call_callback
Well, duplicating the same statement ten times is one extreme, and adding it to the Pike language framework is another. Somewhere in between there's a concept of user-level functions, right? :-)
/ Jonas Walldén
pike-devel@lists.lysator.liu.se