roperl has asked for the wisdom of the Perl Monks concerning the following question:
So I don't need to see the error below in my logsmy $unzip = Archive::Zip->new($zipfile); if ( ( defined($unzip) ) && ( $unzip eq "AZ_OK" ) ) { process zip ... } else { dont process.. $logger->info("error\n"); }
How can I handle this?IO error: reading end of central directory : at /opt/perl-5.26.0/lib/site_perl/5.26.0/Archive/Zip/Archive.pm line +656 thread 87. Archive::Zip::Archive::_readEndOfCentralDirectory(Archive::Zip +::Archive=HASH(0x18632b38), IO::File=GLOB(0x1b575298)) called at /opt +/perl-5.26.0/lib/site_perl/5.26.0/Archive/Zip/Archive.pm line 612 thr +ead 87 Archive::Zip::Archive::readFromFileHandle(Archive::Zip::Archiv +e=HASH(0x18632b38), IO::File=GLOB(0x1b575298), "bad.testfile.zip") ca +lled at /opt/perl-5.26.0/lib/site_perl/5.26.0/Archive/Zip/Archive.pm +line 574 thread 87
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Ignoring errors
by haukex (Archbishop) on Aug 28, 2017 at 15:30 UTC | |
by roperl (Beadle) on Aug 28, 2017 at 17:09 UTC | |
|
Re: Ignoring errors
by Corion (Patriarch) on Aug 28, 2017 at 15:29 UTC | |
by roperl (Beadle) on Aug 28, 2017 at 15:44 UTC | |
|
Re: Ignoring errors
by LanX (Saint) on Aug 28, 2017 at 15:27 UTC |