IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2009, 12:08:50 PM (17 years ago)
Author:
beaumont
Message:

merged with head

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/ippScripts/scripts/magic_process.pl

    r22430 r23352  
    2323
    2424use PS::IPP::Config 1.01 qw( :standard );
    25 
    26 my $ipprc = PS::IPP::Config->new(); # IPP configuration
    2725
    2826use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
     
    6260    defined $outroot;
    6361
    64 # Unhandled exceptions should be passed on to my_die so they get pushed into the database
    65 $SIG{__DIE__} = sub { die @_ if $^S;
    66                       my_die( $_[0], $magic_id, $node, $PS_EXIT_UNKNOWN_ERROR ); };
    67 
    68 $ipprc->define_camera($camera);
     62my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_id, $node, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
     63$ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_id, $node, $PS_EXIT_SYS_ERROR ) if $logfile;
    6964
    7065# RemoveStreaks doesn't know about nebulous. It expects to be able to append strings to outroot
     
    7368# of the file names as arguments
    7469if ($outroot =~ 'neb:/') {
    75     &my_die("RemoveStreaks does not support nebulous paths in outroot", $magic_id, $node,
    76         $PS_EXIT_CONFIG_ERROR);
     70    &my_die("RemoveStreaks does not support nebulous paths in outroot", $magic_id, $node, $PS_EXIT_CONFIG_ERROR);
    7771}
    7872
    7973# resolve any path:// or file:// in outroot
    8074$outroot = $ipprc->file_resolve($outroot);
    81 
    82 $ipprc->redirect_output($logfile) if $logfile;
    8375
    8476my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
     
    340332    my $exit_code = shift;      # Exit code to add
    341333
     334    $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code;
     335
    342336    carp($msg);
    343337    if (defined $magic_id and defined $node and not $no_update) {
Note: See TracChangeset for help on using the changeset viewer.