> below is a snipet of the code. the most relavant part. when
> i enter some bad data in or mysql has problems, it should go
> to error_handler() at the bottom of my script. well it
> does, then it returns unless i put an exit at the end of
> error_handler.
How about:
mysub('param1','par
_data = shift;
$error_data2 = shift;
if ($code == 1) {
$template_error->param( THE_DATA => $error_data );
$template_error->param( NO_RECORD => 1 );
}
if ($code == 2) {
$template_error->param( DATABASE_ERROR => 1 );
}
if ($code == 3) { # this handles the type and state error from line 139
$template_error->param( NO_STATED_TYPE
EMAIL PROTECTED]'
> Subject: RE: exiting correctly
>
>
> > -Original Message-
> > From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, April 23, 2002 3:24 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: exiting correc
> -Original Message-
> From: Boex,Matthew W. [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 3:24 PM
> To: '[EMAIL PROTECTED]'
> Subject: exiting correctly
>
>
>
> i have a regex that checks for a string in a param, if not
> found,
> i have a regex that checks for a string in a param, if not
> found, it should jump to an error subroutine. from there, i
> print out "this is an error", etc. after that prints, unless
> i have an "exit" to stop the processing, the sub jumps back
> and prints out what i don't want it to. h
i have a regex that checks for a string in a param, if not found, it should
jump to an error subroutine. from there, i print out "this is an error",
etc. after that prints, unless i have an "exit" to stop the processing, the
sub jumps back and prints out what i don't want it to. how can i end