On Thu, Oct 02, 2003 at 12:20:02AM +0200, Mirar @ Pike developers forum wrote:
What happens if you return in the try, onerror or finally part?
In the "try" part - return is handled as usual (obviously - if it reached then everything is OK).
In the "onerror" and "finally" parts - stack unwinding and return as usual (unless this is impossible at all, but there are no reasons why it should not be possible - for normal, i.e. not internal compiler/interpreter errors).
However, it would be nice to still have current "catch" behavior, i.e. catch() and catch{} - those are useful sometimes (it may return an exception object, but avoids extra code and looks more clean).
Regards, /Al