Unable to determine error source

Unable to determine error source

am 14.02.2011 17:10:46 von mickalo

------=_NextPart_000_0034_01CBCC2F.72741310
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

I have a script that has been generating a strange error that I can't =
seem to find the source. In the script, at the top, we have the =
following to help trouble shoot it if any errors:

#!/usr/bin/perl
BEGIN { open (STDERR, ">./scriptname_error.log"); }

In the error_log file it generates we keep seeing the following error:

Invalid offset:

And that's it. Normally it will indicate the line#, date, detailed =
error, etc., like in the apache error_log file. but this is all it =
shows. This is a cron script also.

Any ideas or help with this error would be much appreciated.

TIA,

Mike(mickalo)Blezien
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- =3D-=3D-=3D-=3D=
-=3D-=3D-=3D-=3D-=3D-=3D-=3D
Thunder Rain Internet Publishing
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D -=3D-=3D-=3D-=
=3D-=3D-=3D-=3D-=3D-=3D-=3D-
------=_NextPart_000_0034_01CBCC2F.72741310--

Re: Unable to determine error source

am 14.02.2011 18:03:58 von Shawn H Corey

On 11-02-14 11:10 AM, Mike Blezien wrote:
> Invalid offset:
>
> And that's it. Normally it will indicate the line#, date, detailed error, etc., like in the apache error_log file. but this is all it shows. This is a cron script also.

"Invalid offset" is not a Perl error message. Try scanning your script
for the phrase.

To list all error messages:
#!/usr/bin/perl

use strict;
use warnings;

for my $i ( 0 .. 256 ){
$! = $i;
printf "%4d: %s\n", 0+$!, "$!";
}
__END__


--
Just my 0.00000002 million dollars worth,
Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software: Fail early & often.

Eliminate software piracy: use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: Unable to determine error source

am 15.02.2011 05:29:47 von Rob Dixon

On 14/02/2011 16:10, Mike Blezien wrote:
>
> I have a script that has been generating a strange error that I can't
> seem to find the source. In the script, at the top, we have the
> following to help trouble shoot it if any errors:
>
> #!/usr/bin/perl
> BEGIN { open (STDERR, ">./scriptname_error.log"); }
>
> In the error_log file it generates we keep seeing the following
> error:
>
> Invalid offset:
>
> And that's it. Normally it will indicate the line#, date, detailed
> error, etc., like in the apache error_log file. but this is all it
> shows. This is a cron script also.
>
> Any ideas or help with this error would be much appreciated.

Searching my own Perl libraries, I find that exactly this error would be
produced by a call to DateTime::TimeZone->new with an undefined value
for the 'name' parameter. My version validates the parameters to the
call and produces a more informative error message, but it is very
likely that you have an earlier version that doesn't do that.

HTH,

Rob

--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/

Re: Unable to determine error source

am 15.02.2011 09:57:28 von mickalo

----- Original Message -----
From: "Rob Dixon"
To:
Cc: "Mike Blezien"
Sent: Monday, February 14, 2011 10:29 PM
Subject: Re: Unable to determine error source


> On 14/02/2011 16:10, Mike Blezien wrote:
>>
>> I have a script that has been generating a strange error that I can't
>> seem to find the source. In the script, at the top, we have the
>> following to help trouble shoot it if any errors:
>>
>> #!/usr/bin/perl
>> BEGIN { open (STDERR, ">./scriptname_error.log"); }
>>
>> In the error_log file it generates we keep seeing the following
>> error:
>>
>> Invalid offset:
>>
>> And that's it. Normally it will indicate the line#, date, detailed
>> error, etc., like in the apache error_log file. but this is all it
>> shows. This is a cron script also.
>>
>> Any ideas or help with this error would be much appreciated.
>
> Searching my own Perl libraries, I find that exactly this error would be
> produced by a call to DateTime::TimeZone->new with an undefined value
> for the 'name' parameter. My version validates the parameters to the
> call and produces a more informative error message, but it is very
> likely that you have an earlier version that doesn't do that.
>
> HTH,
>
> Rob

Rob,

yes that was exactly it. finally found it after some extensive digging throught
the script.

Thx's

Mike


--
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/