IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 18, 2007, 4:40:39 PM (19 years ago)
Author:
Paul Price
Message:

Ensuring errors are printed when there's a problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStats/src/ppStatsStandAlone.c

    r13181 r13435  
    2323    pmConfig *config = pmConfigRead(&argc, argv, PPSTATS_RECIPE);
    2424    if (!config) {
    25         psError(PS_ERR_UNKNOWN, false, "Unable to read configuration.\n");
     25        psErrorStackPrint(stderr, "Unable to read configuration.\n");
    2626        exit(PS_EXIT_CONFIG_ERROR);
    2727    }
     
    3030    ppStatsData *data = ppStatsSetupFromArgs(&argc, argv, config);
    3131    if (!data) {
    32         psError(PS_ERR_UNKNOWN, false, "Unable to parse command-line arguments.\n");
     32        psErrorStackPrint(stderr, "Unable to parse command-line arguments.\n");
    3333        exit(PS_EXIT_CONFIG_ERROR);
    3434    }
     
    5151            }
    5252        } else {
    53             psLogMsg("ppStats", PS_LOG_ERROR, "Unable to open output file %s.\n", resolved);
     53            psErrorStackPrint(stderr, "Unable to open output file %s.\n", resolved);
    5454            psFree(resolved);
    5555            status = PS_EXIT_CONFIG_ERROR;
     
    6262    psMetadata *results = ppStatsLoop(NULL, data, config);
    6363    if (psListLength(results->list) == 0) {
    64         psLogMsg("ppStats", PS_LOG_ERROR, "No output.\n");
     64        psErrorStackPrint(stderr, "No output.\n");
    6565        psFree(results);
    6666        status = PS_EXIT_DATA_ERROR;
     
    7676    psString output = psMetadataConfigFormat(results);
    7777    if (!output) {
    78         psLogMsg("ppStats", PS_LOG_ERROR, "Unable to generate configuration file with result.\n");
     78        psErrorStackPrint(stderr, "Unable to generate configuration file with result.\n");
    7979        psFree(results);
    8080        status = PS_EXIT_CONFIG_ERROR;
Note: See TracChangeset for help on using the changeset viewer.