[ic] Preventing an error from exiting a usertag
Peter
peter at pajamian.dhs.org
Tue Feb 16 06:25:28 UTC 2010
On 16/02/10 09:58, Grant wrote:
> I'm using the Google::Adwords perl module in a usertag in an IC job,
> and I sometimes get the following in error.log:
>
> Job group=adwords pid=672 terminated with an error: Error: 500 SSL
> read timeout: at
> /usr/lib64/perl5/vendor_perl/5.8.8/Google/Adwords/Service.pm line 200
>
> How can I prevent this error from terminating the job so I can retry
> the call? Is wrapping the right usertag line in eval() the right
> thing to do? Would that not prevent the exit because the error is
> coming from the perl module?
That's exactly what you do:
eval {
# Your code that might die goes here.
};
if ($@) {
# Above code died, handle the error here. die message is contained
# in $@.
}
Note that this only works for global usertags, not local (defined
catalog.cfg) ones.
Peter
More information about the interchange-users
mailing list