IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 12, 2009, 11:38:13 AM (17 years ago)
Author:
Paul Price
Message:

Set error code to PROG_ERROR if not already set --- avoids infinite pantasks loops.

File:
1 edited

Legend:

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

    r23294 r23295  
    9494    print "STDOUT:\n$out1";
    9595    print "STDERR:\n$err1";
    96     &my_die("Unable to perform ppStats on exposure id $exp_id: " . $h1->result(), $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $h1->result() ) unless $result1;
     96    &my_die("Unable to perform ppStats on exposure id $exp_id: " . $h1->result(), $exp_id, $tmp_exp_name, $tmp_class_id, $uri, ($h1->result() or $PS_EXIT_PROG_ERROR) ) unless $result1;
    9797
    9898    print "[Running " . join(' ', @command2) . "]\n";
     
    103103    print "STDOUT:\n$out2";
    104104    print "STDERR:\n$err2";
    105     &my_die("Unable to perform ppStatsFromMetadata on exposure id $exp_id: " . $h2->result(), $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $h2->result() ) unless $result2;
     105    &my_die("Unable to perform ppStatsFromMetadata on exposure id $exp_id: " . $h2->result(), $exp_id, $tmp_exp_name, $tmp_class_id, $uri, ($h2->result() or $PS_EXIT_PROG_ERROR) ) unless $result2;
    106106    chomp $out2;
    107107    $cmdflags = $out2;
     
    128128
    129129# determine solar-system parameters
    130 my $longitude = &value_for_flag ($cmdflags, "-longitude");
    131 my $latitude  = &value_for_flag ($cmdflags, "-latitude");
    132 my $elevation = &value_for_flag ($cmdflags, "-elevation");
    133 my $ra        = &value_for_flag ($cmdflags, "-ra");
    134 my $dec       = &value_for_flag ($cmdflags, "-decl");
    135 my $dateobs   = &value_for_flag ($cmdflags, "-dateobs");
     130my $longitude = &value_for_flag($cmdflags, "-longitude");
     131my $latitude  = &value_for_flag($cmdflags, "-latitude");
     132my $elevation = &value_for_flag($cmdflags, "-elevation");
     133my $ra        = &value_for_flag($cmdflags, "-ra");
     134my $dec       = &value_for_flag($cmdflags, "-decl");
     135my $dateobs   = &value_for_flag($cmdflags, "-dateobs");
    136136
    137137# if the needed data is available, pass it to sunmoon:
     
    212212
    213213    # for failed imfiles, we insert UNKNOWN for inst, telescope, class_id
     214
     215    $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code;
    214216
    215217    carp($msg);
Note: See TracChangeset for help on using the changeset viewer.