IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18733


Ignore:
Timestamp:
Jul 24, 2008, 6:07:58 PM (18 years ago)
Author:
bills
Message:

better error reporting when parsing failed

Location:
trunk/pstamp/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/dquery_finish.pl

    r18639 r18733  
    6767exit ($PS_EXIT_CONFIG_ERROR) unless defined $outputDataStoreRoot; # lookup failure outputs a message
    6868
    69 my $out_dir = "$outputDataStoreRoot/$product/$req_name";
     69if ($product eq "NULL") {
     70    # parsing failed just with fault = 0 (this leaves previously set fault in place
     71    stop_request($req_id, 0, $verbose);
     72    exit 0;
     73}
     74my $prod_dir = "$outputDataStoreRoot/$product";
     75if (! -e $prod_dir ) {
     76    # something must have gone wrong at the parse stage
     77    stop_request($req_id, $PS_EXIT_SYS_ERROR, $verbose);
     78    die "product directory does not exist $prod_dir";
     79}
     80my $out_dir = "$prod_dir/$req_name";
    7081if (! -e $out_dir ) {
    7182    # something must have gone wrong at the parse stage
  • trunk/pstamp/scripts/request_finish.pl

    r18620 r18733  
    7474    my $command = $finish_cmd . " --req_id $req_id --req_name $req_name --product $product";
    7575    $command   .= " --dbname $dbname" if $dbname;
     76    $command   .= " --verbose" if $verbose;
    7677    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    7778        run(command => $command, verbose => $verbose);
Note: See TracChangeset for help on using the changeset viewer.