Archive-Rar
view release on metacpan or search on metacpan
lib/Archive/Rar.pm view on Meta::CPAN
# #-
# #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# RAR exits with a zero code (0) in case of successful operation. The exit
# code of non-zero means the operation is cancelled due to error:
#
# 255 USER BREAK User stopped the process
# 8 MEMORY ERROR Not enough memory for operation
# 7 USER ERROR Command line option error
# 6 OPEN ERROR Open file error
# 5 WRITE ERROR Write to disk error
# 4 LOCKED ARCHIVE Attempt to modify an archive previously locked
# by the 'k' command
# 3 CRC ERROR A CRC error occurred when unpacking
# 2 FATAL ERROR A fatal error occurred
# 1 WARNING Non fatal error(s) occurred
# 0 SUCCESS Successful operation (User exit)
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# ++ fonctions rcupres dans CHKPROJECT.pm pour en viter l'inclusion.
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
lib/Archive/Rar.pm view on Meta::CPAN
sub SetError {
my $self = shift;
$self->{err} = shift;
# For the rar command.
my %errors = (
0 => '',
1 => "WARNING : Non fatal error(s) occurred.",
2 => "FATAL ERROR : A fatal error occurred.",
3 => "CRC ERROR : A CRC error occurred when unpacking.",
4 => "LOCKED ARCHIVE : Attempt to modify an archive previously locked by the 'k' command.",
5 => "WRITE ERROR : Write to disk error.",
6 => "OPEN ERROR : Open file error.",
7 => "USER ERROR : Command line option error.",
8 => "MEMORY ERROR : Not enough memory for operation.",
255 => "USER BREAK : User stopped the process.",
256 => sub {"CHDIR ERROR : '" . $_[0] . "' inaccessible : " . $! . "."},
257 => sub {"CHDIR ERROR : '" . $_[0] . "' inaccessible : " . $! . "."},
);
my $error = $errors{ $self->{'err'} };
if (not defined $error) {
lib/Archive/Rar/Passthrough.pm view on Meta::CPAN
{
my %Errors = (
255 => 'User stopped the process',
9 => 'Create file error',
8 => 'Not enough memory for operation',
7 => 'Command line option error',
6 => 'Open file error',
5 => 'Write to disk error',
4 => 'Attempt to modify an archive previously locked by the \'k\' command',
3 => 'A CRC error occurred when unpacking',
2 => 'A fatal error occurred',
1 => 'Non-fatal error(s) occurred',
);
sub explain_error {
my $self = shift;
my $error = shift;
return 'Unknown error' if not $error and not exists($Errors{$error});
return $Errors{$error};
lib/Archive/Rar/Passthrough.pm view on Meta::CPAN
RAR exits with a zero code (0) in case of successful operation. The exit
code of non-zero means the operation was cancelled due to an error:
255 USER BREAK User stopped the process
9 CREATE ERROR Create file error
8 MEMORY ERROR Not enough memory for operation
7 USER ERROR Command line option error
6 OPEN ERROR Open file error
5 WRITE ERROR Write to disk error
4 LOCKED ARCHIVE Attempt to modify an archive previously locked
by the 'k' command
3 CRC ERROR A CRC error occurred when unpacking
2 FATAL ERROR A fatal error occurred
1 WARNING Non fatal error(s) occurred
0 SUCCESS Successful operation
There may be other codes in future versions of 'rar'. Error C<9> - I<CREATE ERROR>, for example,
was not present in version 2.80.
The explanations above can be accessed by your code through the C<explain_error($errno)> method.
( run in 0.451 second using v1.01-cache-2.11-cpan-49f99fa48dc )