IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 13, 2006, 5:10:34 PM (20 years ago)
Author:
eugene
Message:

all sorts of error handling fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroAstromGuess.c

    r9374 r9574  
    2626    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");
    2727    if (!recipe) {
    28         psErrorStackPrint(stderr, "Can't find PSASTRO recipe!\n");
    29         exit(EXIT_FAILURE);
     28        psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!");
     29        return false;
    3030    }
    3131
     
    3333    pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, "PSASTRO.INPUT");
    3434    if (!input) {
    35         psErrorStackPrint(stderr, "Can't find input data!\n");
    36         exit(EXIT_FAILURE);
     35        psError(PSASTRO_ERR_CONFIG, true, "Can't find input data");
     36        return false;
    3737    }
    3838
     
    4545
    4646    while ((chip = pmFPAviewNextChip (view, fpa, 1)) != NULL) {
    47         psTrace (__func__, 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
     47        psTrace ("psastro", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
    4848        if (!chip->process || !chip->file_exists) { continue; }
    4949
     
    6363        // XXX should this go into a different function? this would separate WCS interpretation from application
    6464        while ((cell = pmFPAviewNextCell (view, fpa, 1)) != NULL) {
    65             psTrace (__func__, 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
     65            psTrace ("psastro", 4, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
    6666            if (!cell->process || !cell->file_exists) { continue; }
    6767
     
    8080                    p_psDeproject (raw->sky, raw->TP, fpa->projection);
    8181
    82                     if (i < 0) {
     82                    if ((i < 10) && (psTraceGetLevel("psastro.guess") > 5)) {
    8383                        fprintf (stderr, "up: %f,%f -> %f,%f -> %f,%f -> %f,%f\n",
    8484                                 raw->chip->x, raw->chip->y,
Note: See TracChangeset for help on using the changeset viewer.