IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11050


Ignore:
Timestamp:
Jan 11, 2007, 3:51:18 PM (19 years ago)
Author:
jhoblitt
Message:

attempt to revise fault handling to match the 'new' p0tool semantics

File:
1 edited

Legend:

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

    r11048 r11050  
    8585# Look for programs we need
    8686my $missing_tools;
    87 my $p0tool = can_run('p0tool') or (warn "Can't find p0tool" and $missing_tools = 1);
    88 my $ppStats = can_run('ppStats') or (warn "Can't find ppStats" and $missing_tools = 1);
     87my $p0tool = can_run('p0tool')
     88    or (warn "Can't find p0tool" and $missing_tools = 1);
     89my $ppStats = can_run('ppStats')
     90    or (warn "Can't find ppStats" and $missing_tools = 1);
    8991
    9092if ($missing_tools) {
    9193    warn ("Can't find required tools");
    92     &my_die ("", "", $PS_EXIT_CONFIG_ERROR);
     94    exit($PS_EXIT_CONFIG_ERROR);
    9395}
    9496
     
    183185
    184186    unless ($success) {
    185         # XXX this is tricky: if we can't run -updateimfile, can we actually set the error code?
    186         # XXX if this is not a database error, it is probably a programming error (in p0tool or the passed args)
    187         warn ("Unable to perform p0tool -updateimfile: $error_code");
    188         &my_die ($exp_tag, $class_id, $error_code);
     187        # XXX if we can't run -addprocessedimfile, we can't actually set the
     188        # error code.
     189        # XXX if this is not a database error, it is probably a
     190        # programming error (in p0tool or the passed args)
     191        warn ("Unable to perform p0tool -addprocessedimfile: $error_code");
     192        exit($error_code);
    189193    }
    190194}
     
    210214    my $exit_code = $_[2];
    211215    if ($exp_tag && $class_id) {
    212         system ("$p0tool -faultimfile -exp_tag $exp_tag -class_id $class_id -code $exit_code");
     216        system ("$p0tool -addprocessedimfile -exp_tag $exp_tag -class_id $class_id -code $exit_code");
    213217    }
    214218    exit $exit_code;
Note: See TracChangeset for help on using the changeset viewer.