IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 4, 2009, 4:17:15 PM (17 years ago)
Author:
Paul Price
Message:

Removing the exception handling I put in the other day. We suspect it's interfering with kapa falling over when the pipe is cut. Instead, being more careful with checking return status of PS::IPP::Config->new() and 6752ipprc->redirect_output(), combined with recent change to PS::IPP::Config should mean the former trouble of Perl scripts exiting without pushing exit status into the database should still be solved.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/detrend_reject_exp.pl

    r22430 r23186  
    2020use PS::IPP::Metadata::List qw( parse_md_list );
    2121use Statistics::Descriptive;
    22 
    23 my $ipprc = PS::IPP::Config->new(); # IPP configuration
    2422
    2523my $ITER_LIMIT = 20;
     
    6058    defined $outroot;
    6159
    62 # Unhandled exceptions should be passed on to my_die so they get pushed into the database
    63 $SIG{__DIE__} = sub { die @_ if $^S;
    64                       my_die( $_[0], $det_id, $iter, $PS_EXIT_UNKNOWN_ERROR ); };
    65 
    66 # check for existing directory, generate if needed
    67 $ipprc->outroot_prepare($outroot);
    68 
     60my $ipprc = PS::IPP::Config->new() or my_die( "Unable to set up", $det_id, $iter, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
     61$ipprc->outroot_prepare($outroot) or my_die( "Unable to prepare output root", $det_id, $iter, $PS_EXIT_SYS_ERROR );
    6962my $logName = "$outroot.log"; # Name for log
    70 
    71 $ipprc->redirect_output($logName) if $redirect;
     63$ipprc->redirect_output($logName) or my_die( "Unable to redirect", $det_id, $iter, $PS_EXIT_SYS_ERROR ) if $redirect;
    7264
    7365# values to extract from output metadata and the stats to calculate
Note: See TracChangeset for help on using the changeset viewer.