You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ben Cottrell <be...@stockmaster.com> on 2000/11/01 20:43:50 UTC
Re: return from nested functions
On Wed, 1 Nov 2000 11:37:00 -0800 (PST), "Paul J. Lucas" wrote:
> If I'm a few levels deep into function calls, I'd liek to be
> able to do something like "return SERVER_ERROR" and have the
> entire call stack unwind and the current request stopped.
Will something like this do what you need?
~Ben
eval
{
get as many levels deep into functions as you want
...
...
...
die("SERVER_ERROR");
...
...
...
};
$the_error = $@;
if ($the_error)
{
warn("Unwound stack because of $the_error");
}