IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 28, 2008, 10:02:33 AM (18 years ago)
Author:
eugene
Message:

carp error, and report a different error for md parse error vs empty md

File:
1 edited

Legend:

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

    r19118 r19262  
    33use warnings;
    44use strict;
     5use Carp;
    56
    67## report the program and machine
     
    2627use Pod::Usage qw( pod2usage );
    2728
    28 my ($stack_id, $dbname, $outroot, $verbose, $no_update, $no_op, $save_temps);
     29my ($stack_id, $dbname, $outroot, $debug, $verbose, $no_update, $no_op, $save_temps);
    2930GetOptions(
    3031    'stack_id|d=s'      => \$stack_id, # Stack identifier
    3132    'dbname|d=s'        => \$dbname, # Database name
    3233    'outroot=s'         => \$outroot, # Output root name
     34    'debug'             => \$debug,   # Print to stdout
    3335    'verbose'           => \$verbose,   # Print to stdout
    3436    'no-update'         => \$no_update, # Don't update the database?
     
    7678    }
    7779
     80    if (@$stdout_buf == 0) {
     81        &my_die("No input skyfiles selected", $stack_id, $PS_EXIT_PROG_ERROR);
     82    }
    7883    my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
    7984        &my_die("Unable to parse metadata config doc", $stack_id, $PS_EXIT_PROG_ERROR);
     
    115120
    116121# Generate MDC file with the inputs
    117 my ($listFile, $listName) = tempfile( "$tess_id.$skycell_id.stk$stack_id.list.XXXX",
    118                                       UNLINK => !$save_temps );
     122my ($listFile, $listName) = tempfile( "/tmp/$tess_id.$skycell_id.stk.$stack_id.list.XXXX", UNLINK => !$save_temps );
    119123my $num = 0;
    120124my $inputSources;               # Sources to use as stamps
     
    170174    $command .= " -F PSPHOT.BACKMDL PSPHOT.BACKMDL.MEF";
    171175    $command .= " -photometry";
     176    $command .= " -debug-stack" if defined $debug;
    172177    $command .= " -tracedest $traceDest -log $logDest";
    173178    $command .= " -dbname $dbname" if defined $dbname;
     
    237242    my $exit_code = shift;      # Exit code to add
    238243
    239     warn($msg);
     244    carp($msg);
    240245    if (defined $stack_id and not $no_update) {
    241246        my $command = "$stacktool -addsumskyfile -stack_id $stack_id -code $exit_code";
Note: See TracChangeset for help on using the changeset viewer.