perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Lenski <dlen...@gmail.com>
Subject Re: returning errors from Execute
Date Sun, 12 Feb 2006 21:15:03 GMT
I've recently learned to use the error-catching feature of
Embperl::Object's Execute command.  The thing I'm wondering is if it's
possible to make it return just the string or object that I pass to
the croak/die command, rather than the complete Embperl error message.

I would like to be able to do:

# base.html
Execute({inputfile=>"*", errors=>\@errors});
foreach (@errors) {
  if ($_ eq "FIXME") {
    # respond to this error
  }
}

# foo.html
[- die "FIXME"; -]

But right now, the error array gets filled with long hard-to-parse
strings such as:

[7594]ERR:  24:  Error in Perl code: FIXME!! at /foo/bar/baz/foo.html line 1

Is there a way to change this behavior?  Thanks!

Dan Lenski

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message