IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 17, 2010, 4:40:03 PM (16 years ago)
Author:
Paul Price
Message:

Reworked all ippTools to put fault=2 (SYS_ERROR) when can't find SQL file (presumably due to NFS problems). Removed DATA_ERROR because ippTools don't work on data (astronomical images or catalogues). This should allow us to turn on revert for fault=2 only.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/dettool_correction.c

    r20377 r26981  
    3434    PXOPT_LOOKUP_STR(label, config->args, "-label", false, false);
    3535
    36     // build the needed where 
     36    // build the needed where
    3737    psMetadata *where = psMetadataAlloc();
    3838    psMetadataAddS64(where, PS_LIST_TAIL, "det_id", 0, "==", ref_det_id);
     
    8888         detRun->solang_max,
    8989         use_label,
    90         detRun->det_id, // ref_det_id
    91         detRun->iteration // ref_iter
     90        detRun->det_id, // ref_det_id
     91        detRun->iteration // ref_iter
    9292    );
    9393    psFree(runs);
     
    140140    psString query = pxDataGet("dettool_tocorrectimfile.sql");
    141141    if (!query) {
    142         psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
     142        psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
    143143        return false;
    144144    }
    145145
    146146    if (psListLength(where->list)) {
    147         // NOTE the SQL uses an intermediate table 'det1' for this query
    148         psString whereClause = psDBGenerateWhereConditionSQL(where, "det1"); 
     147        // NOTE the SQL uses an intermediate table 'det1' for this query
     148        psString whereClause = psDBGenerateWhereConditionSQL(where, "det1");
    149149        psStringAppend(&query, " AND %s", whereClause);
    150150        psFree(whereClause);
     
    198198    psString query = pxDataGet("dettool_tocorrectexp.sql");
    199199    if (!query) {
    200         psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
     200        psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
    201201        return false;
    202202    }
     
    248248        return false;
    249249    }
    250    
     250
    251251    // automatically stop completed 'correct' detRuns
    252252    psString query = pxDataGet("dettool_stop_completed_correct_runs.sql");
    253253    if (!query) {
    254         psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
     254        psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
    255255        return false;
    256256    }
Note: See TracChangeset for help on using the changeset viewer.