IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 26, 2006, 2:17:11 PM (20 years ago)
Author:
jhoblitt
Message:

change -runs to differentiate between database errors & no rows founds

File:
1 edited

Legend:

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

    r9735 r9753  
    795795    PS_ASSERT_PTR_NON_NULL(config, false);
    796796
    797 //    psArray *runs = detRunSelectRowObjects(config->dbh, config->where, 0);
    798797    // XXX fix the hard coding of the table name
    799798    psArray *runs = psDBSelectRows(config->dbh, "detRun", config->where, 0);
    800799    if (!runs) {
     800        psError(PS_ERR_UNKNOWN, false, "database error");
     801        return false;
     802    }
     803
     804    if (!psArrayLength(runs)) {
    801805        psError(PS_ERR_UNKNOWN, false, "no detRun rows found");
    802         return false;
     806        psFree(runs);
     807        return true;
    803808    }
    804809
Note: See TracChangeset for help on using the changeset viewer.