[ic] Preventing an error from exiting a usertag

Grant emailgrant at gmail.com
Tue Feb 23 18:44:52 UTC 2010


>> 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

Thank you Peter.

To whom it may concern, I'm switching from Google::Adwords to
google-api-adwords-perl because v13 of the API is being sunsetted in
60 days and the author has announced he will not be updating it for
v200909.

- Grant



More information about the interchange-users mailing list