for my $f (($sig_file, $upload_file)) {
my $stage = File::Spec->catfile($Stage_dir, $f);
my @mv_args = ("/bin/mv", File::Spec->catfile($Scratch_dir, $f), $stage);
- fatal("@mv_args failed",0) if system (@mv_args) != 0;
+ die 'command failed: '.join(' ', @mv_args)
+ if system (@mv_args) != 0;
chmod 0644, $stage;
}
# be found by mirrors, etc.
#
rename $stage_signature, $final_signature
- or fatal("rename($stage_signature, $final_signature) failed: $!",0);
+ or die "rename($stage_signature, $final_signature): $!";
rename $stage_upload, $final_upload
- or fatal("rename($stage_upload, $final_upload) failed: $!",0);
+ or die "rename($stage_upload, $final_upload): $!";
}
=item execute_commands ( $oplist )
mail($E->message,1);
}
} else {
- # Exceptions thrown by perl itself come out as strings
+ # Exceptions thrown by perl itself come out as strings, as do simple
+ # exceptions thrown using die, used to reflect system errors like
+ # failures of commands or operations that we know should succeed,
+ # such as opening a file that we already know exists.
warn "error during processing: $@";
}