Skip to content

Commit

Permalink
Better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Matéu authored and Matéu committed Oct 13, 2020
1 parent 862f098 commit 3ddf2e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/DateTime/Timezones/State.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ method new (blob8 $tz, :$name) {
$VERSION = 1 if $tz[^20] ~~ [0x54,0x5A,0x69,0x66, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];
$VERSION = 2 if $tz[^20] ~~ [0x54,0x5A,0x69,0x66,0x32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

die 'TZ file does not begin with correct header (must begin with "TZif")'
die "TZ file for $name does not begin with correct header (must begin with 'TZif'),\nBegan with ", $tz[^20]
unless $VERSION;

my $pos;
Expand Down

0 comments on commit 3ddf2e9

Please sign in to comment.