IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 24, 2004, 11:59:29 AM (22 years ago)
Author:
evanalst
Message:

Add ability to print error string for errorno error codes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psError.c

    r1868 r1881  
    1010 *  @author Eric Van Alst, MHPCC
    1111 *   
    12  *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-09-23 22:02:06 $
     12 *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-09-24 21:59:29 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    182182
    183183        for (int lcv=0;lcv<errorStackSize;lcv++) {
    184             fprintf(fd," -> %s: %s\n     %s\n",
    185                     errorStack[lcv]->name,
    186                     psErrorCodeString(errorStack[lcv]->code),
    187                     errorStack[lcv]->msg);
     184            if(errorStack[lcv]->code >= PS_ERR_BASE) {
     185                fprintf(fd," -> %s: %s\n     %s\n",
     186                        errorStack[lcv]->name,
     187                        psErrorCodeString(errorStack[lcv]->code),
     188                        errorStack[lcv]->msg);
     189            } else {
     190                fprintf(fd," -> %s: %s\n     %s\n",
     191                        errorStack[lcv]->name,
     192                        strerror(errorStack[lcv]->code),
     193                        errorStack[lcv]->msg);
     194            }
    188195        }
    189196    }
Note: See TracChangeset for help on using the changeset viewer.