IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1731


Ignore:
Timestamp:
Sep 8, 2004, 11:22:47 AM (22 years ago)
Author:
desonia
Message:

changed the naming conventions of errors.

Location:
trunk/psLib/src
Files:
10 edited

Legend:

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

    r1716 r1731  
    1212 *  @author George Gusciora, MHPCC
    1313 *
    14  *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-09-08 00:19:21 $
     14 *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-09-08 21:22:47 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4242
    4343#include "psSysUtilsErrors.h"
    44 #define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psLogMsg."
    4544
    4645#define MIN_LOG_LEVEL 0
     
    113112
    114113    if (sscanf(dest, "%4s:%256s", protocol, location) < 2) {
    115         psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
     114        psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
    116115                   PS_ERRORTEXT_psLogMsg_DESTINATION_MALFORMED,
    117116                   dest);
     
    134133            return true;
    135134        }
    136         psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
     135        psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
    137136                   PS_ERRORTEXT_psLogMsg_DEST_LOCATION_INVALID,
    138137                   location);
     
    142141
    143142        if (file == NULL) {
    144             psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_IO,
     143            psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_IO,
    145144                       PS_ERRORTEXT_psLogMsg_OPEN_FILE_FAILED,
    146145                       location);
     
    154153    }
    155154
    156     psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
     155    psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
    157156               PS_ERRORTEXT_psLogMsg_UNSUPPORTED_PROTOCOL,
    158157               protocol);
     
    218217            break;
    219218        default:
    220             psErrorMsg(ERRORNAME_PREFIX "psLogSetFormat", true, PS_ERR_BAD_PARAMETER_VALUE,
     219            psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetFormat", true, PS_ERR_BAD_PARAMETER_VALUE,
    221220                       PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY, *ptr);
    222221            break;
     
    333332            *head_ptr++ = '|';
    334333        }
    335         maxLength -= snprintf(head_ptr, maxLength, "%15.15s", name);
     334        if (strlen(name) > 15) {
     335            maxLength -= snprintf(head_ptr, maxLength, "+%14.14s", &name[strlen(name)-14]);
     336        } else {
     337            maxLength -= snprintf(head_ptr, maxLength, "%15.15s", name);
     338        }
     339
    336340        head_ptr += strlen(head_ptr);
    337341    }
  • trunk/psLib/src/sys/psString.c

    r1715 r1731  
    99 *  @author Eric Van Alst, MHPCC
    1010 *   
    11  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-08 00:15:16 $
     11 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-08 21:22:47 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2222
    2323#include "psSysUtilsErrors.h"
    24 #define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psString."
    2524
    2625char *psStringCopy(const char *str)
     
    3938    if (nChar < 0) {
    4039        // Log error message and return NULL
    41         psErrorMsg(ERRORNAME_PREFIX "psStringNCopy", PS_ERR_BAD_PARAMETER_VALUE, true,
     40        psErrorMsg(PS_ERRORNAME_DOMAIN "psStringNCopy", PS_ERR_BAD_PARAMETER_VALUE, true,
    4241                   PS_ERRORTEXT_psString_NCHAR_NEGATIVE,
    4342                   nChar);
  • trunk/psLib/src/sys/psTrace.c

    r1718 r1731  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-08 05:59:41 $
     11 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-08 21:22:47 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4848#include "psString.h"
    4949#include "psError.h"
    50 #include "psAbort.h"
     50#include "psLogMsg.h"
     51
     52#include "psSysUtilsErrors.h"
    5153
    5254static p_psComponent* cRoot = NULL; // The root of the trace component
     
    117119    for (i = 0; i < currentNode->n; i++) {
    118120        if (NULL == currentNode->subcomp[i]) {
    119             psError(__func__,
    120                     "Sub-component %d of node %s in the trace tree is NULL.\n", i, currentNode->name);
     121            psLogMsg(PS_ERRORNAME_DOMAIN "p_psTraceReset", PS_LOG_WARN,
     122                     PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,
     123                     i, currentNode->name);
    121124        } else {
    122125            p_psTraceReset(currentNode->subcomp[i]);
     
    141144to ANSI-C.
    142145 *****************************************************************************/
    143 static void componentAdd(const char *addNodeName, int level)
     146static bool componentAdd(const char *addNodeName, int level)
    144147{
    145148    int i = 0;                  // Loop index variable.
     
    152155    // XXX: Verify that this is the correct behavior.
    153156    if (strcmp("", addNodeName) == 0) {
    154         psAbort(__func__, "Failed to add null component to trace tree.\n");
     157        psErrorMsg(PS_ERRORNAME_DOMAIN "componentAdd",PS_ERR_BAD_PARAMETER_NULL,true,
     158                   PS_ERRORTEXT_psTrace_ADD_NULL_COMPONENT);
     159        return false;
    155160    }
    156161
     
    158163    if (strcmp(".", addNodeName) == 0) {
    159164        cRoot->level = level;
    160         return;
     165        return true;
    161166    }
    162167
    163168    if (addNodeName[0] != '.') {
    164         printf("ERROR: failed to add %s to the root component tree.\n", addNodeName);
    165         exit(1);
     169        psErrorMsg(PS_ERRORNAME_DOMAIN "componentAdd",PS_ERR_BAD_PARAMETER_VALUE,true,
     170                   PS_ERRORTEXT_psTrace_MALFORMED_COMPONENT_NAME,
     171                   addNodeName);
     172        return false;
    166173    }
    167174
     
    205212        }
    206213    }
     214
     215    return true;
    207216}
    208217
     
    218227 zero
    219228*****************************************************************************/
    220 int psTraceSetLevel(const char *comp,   // component of interest
    221                     int level)  // desired trace level
     229bool psTraceSetLevel(const char *comp,   // component of interest
     230                     int level)  // desired trace level
    222231{
    223232    // If the root component tree does not exist, then initialize it.
     
    226235    }
    227236    // Add the new component to the component tree.
    228     componentAdd(comp, level);
    229 
    230     // return 0 on success.
    231     return 0;
     237    if ( !componentAdd(comp, level) ) {
     238        psErrorMsg(PS_ERRORNAME_DOMAIN "psTraceSetLevel", PS_ERR_UNKNOWN, false,
     239                   PS_ERRORTEXT_psTrace_FAILED_TO_ADD_COMPONENT,level,comp);
     240        return false;
     241    }
     242    return true;
    232243}
    233244
     
    274285        for (i = 0; i < currentNode->n; i++) {
    275286            if (NULL == currentNode->subcomp[i]) {
    276                 psError(__func__,
    277                         "Sub-component %d of node %s in trace tree is NULL.\n", i, currentNode->name);
     287                psLogMsg(PS_ERRORNAME_DOMAIN "p_psTraceReset", PS_LOG_WARN,
     288                         PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,
     289                         i, currentNode->name);
    278290            }
    279291
     
    321333
    322334/*****************************************************************************
    323     doPrintTraceLevelsOld()
    324  This function recursively searches the component tree supplied by the
    325  parameter "comp" and prints the name and level of each component.
    326     Inputs:
    327  comp: a node in the component tree.
    328  level: the level of that node
    329     Outputs:
    330  none
    331     Returns:
    332  null
    333  *****************************************************************************/
    334 static void doPrintTraceLevelsOld(const p_psComponent* comp, int depth)
    335 {
    336     int i = 0;
    337 
    338     if (comp->name[0] == '\0') {
    339         printf("%*s%-*s %d\n", depth, "", 20 - depth,
    340                "(root)", (comp->level == PS_DEFAULT_TRACE_LEVEL) ? 0 : comp->level);
    341     } else {
    342         if (comp->level == PS_DEFAULT_TRACE_LEVEL) {
    343             printf("%*s%-*s %s\n", depth, "", 20 - depth, comp->name, ".");
    344         } else {
    345             printf("%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
    346                    comp->level);
    347         }
    348     }
    349 
    350     for (i = 0; i < comp->n; i++) {
    351         doPrintTraceLevelsOld(comp->subcomp[i], depth + 1);
    352     }
    353 }
    354 
    355 /*****************************************************************************
    356335    doPrintTraceLevels()
    357336 This function recursively searches the component tree supplied by the
     
    372351
    373352    if (comp->name[0] == '\0') {
    374         psAbort(__func__, "component name is NULL\n");
     353        return;
    375354    } else {
    376355        if (comp->level == PS_DEFAULT_TRACE_LEVEL) {
     
    435414
    436415    if (NULL == comp) {
    437         psError(__func__, "p_psTrace() called on a NULL trace level tree\n");
     416        psErrorMsg(PS_ERRORNAME_DOMAIN "psTrace", PS_ERR_BAD_PARAMETER_NULL, true,
     417                   PS_ERRORTEXT_psTrace_NULL_TRACETREE,
     418                   __func__);
     419        return;
    438420    }
    439421    // Only display this message if it's trace level is less than the level
  • trunk/psLib/src/sys/psTrace.h

    r1722 r1731  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-08 06:07:57 $
     11 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-08 21:22:47 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6565
    6666/// Set trace level
    67 int psTraceSetLevel(const char *facil,     ///< facilty of interest
    68                     int level)     ///< desired trace level
     67bool psTraceSetLevel(const char *facil,     ///< facilty of interest
     68                     int level)     ///< desired trace level
    6969;
    7070
  • trunk/psLib/src/sysUtils/psLogMsg.c

    r1716 r1731  
    1212 *  @author George Gusciora, MHPCC
    1313 *
    14  *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2004-09-08 00:19:21 $
     14 *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2004-09-08 21:22:47 $
    1616 *
    1717 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4242
    4343#include "psSysUtilsErrors.h"
    44 #define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psLogMsg."
    4544
    4645#define MIN_LOG_LEVEL 0
     
    113112
    114113    if (sscanf(dest, "%4s:%256s", protocol, location) < 2) {
    115         psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
     114        psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
    116115                   PS_ERRORTEXT_psLogMsg_DESTINATION_MALFORMED,
    117116                   dest);
     
    134133            return true;
    135134        }
    136         psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
     135        psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
    137136                   PS_ERRORTEXT_psLogMsg_DEST_LOCATION_INVALID,
    138137                   location);
     
    142141
    143142        if (file == NULL) {
    144             psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_IO,
     143            psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_IO,
    145144                       PS_ERRORTEXT_psLogMsg_OPEN_FILE_FAILED,
    146145                       location);
     
    154153    }
    155154
    156     psErrorMsg(ERRORNAME_PREFIX "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
     155    psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetDestination", true, PS_ERR_LOCATION_INVALID,
    157156               PS_ERRORTEXT_psLogMsg_UNSUPPORTED_PROTOCOL,
    158157               protocol);
     
    218217            break;
    219218        default:
    220             psErrorMsg(ERRORNAME_PREFIX "psLogSetFormat", true, PS_ERR_BAD_PARAMETER_VALUE,
     219            psErrorMsg(PS_ERRORNAME_DOMAIN "psLogSetFormat", true, PS_ERR_BAD_PARAMETER_VALUE,
    221220                       PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY, *ptr);
    222221            break;
     
    333332            *head_ptr++ = '|';
    334333        }
    335         maxLength -= snprintf(head_ptr, maxLength, "%15.15s", name);
     334        if (strlen(name) > 15) {
     335            maxLength -= snprintf(head_ptr, maxLength, "+%14.14s", &name[strlen(name)-14]);
     336        } else {
     337            maxLength -= snprintf(head_ptr, maxLength, "%15.15s", name);
     338        }
     339
    336340        head_ptr += strlen(head_ptr);
    337341    }
  • trunk/psLib/src/sysUtils/psString.c

    r1715 r1731  
    99 *  @author Eric Van Alst, MHPCC
    1010 *   
    11  *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-08 00:15:16 $
     11 *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-08 21:22:47 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2222
    2323#include "psSysUtilsErrors.h"
    24 #define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psString."
    2524
    2625char *psStringCopy(const char *str)
     
    3938    if (nChar < 0) {
    4039        // Log error message and return NULL
    41         psErrorMsg(ERRORNAME_PREFIX "psStringNCopy", PS_ERR_BAD_PARAMETER_VALUE, true,
     40        psErrorMsg(PS_ERRORNAME_DOMAIN "psStringNCopy", PS_ERR_BAD_PARAMETER_VALUE, true,
    4241                   PS_ERRORTEXT_psString_NCHAR_NEGATIVE,
    4342                   nChar);
  • trunk/psLib/src/sysUtils/psSysUtilsErrors.dat

    r1716 r1731  
    1818#
    1919psMemory_NULL_BLOCK                    NULL memory block found.
    20 psMemory_DEREF_BLOCK_USE               Memory block %ld was freed but still used.
     20psMemory_DEREF_BLOCK_USE               Memory block %ld was freed but still being used.
    2121psMemory_UNDERFLOW                     Memory block %ld is corrupted; buffer underflow detected.
    2222psMemory_OVERFLOW                      Memory block %ld is corrupted; buffer overflow detected.
    23 psMemory_MULTIPLE_FREE                 Block %ld allocated at %s:%d freed more than once at %s:%d.
     23psMemory_MULTIPLE_FREE                 Block %ld, allocated at %s:%d, freed multiple times at %s:%d.
    2424#
    2525# Error Messages from psString.c:
  • trunk/psLib/src/sysUtils/psSysUtilsErrors.h

    r1716 r1731  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-09-08 00:19:21 $
     9 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-09-08 21:22:47 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3636#define PS_ERRORTEXT_psLogMsg_UNKNOWN_KEY "Unknown logging keyword %c."
    3737#define PS_ERRORTEXT_psMemory_NULL_BLOCK "NULL memory block found."
    38 #define PS_ERRORTEXT_psMemory_DEREF_BLOCK_USE "Memory block %ld was freed but still used."
     38#define PS_ERRORTEXT_psMemory_DEREF_BLOCK_USE "Memory block %ld was freed but still being used."
    3939#define PS_ERRORTEXT_psMemory_UNDERFLOW "Memory block %ld is corrupted; buffer underflow detected."
    4040#define PS_ERRORTEXT_psMemory_OVERFLOW "Memory block %ld is corrupted; buffer overflow detected."
    41 #define PS_ERRORTEXT_psMemory_MULTIPLE_FREE "Block %ld allocated at %s:%d freed more than once at %s:%d."
     41#define PS_ERRORTEXT_psMemory_MULTIPLE_FREE "Block %ld, allocated at %s:%d, freed multiple times at %s:%d."
    4242#define PS_ERRORTEXT_psString_NCHAR_NEGATIVE "Can not copy a negative number of characters (%d)."
    4343#define PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT "Sub-component %d of node %s in trace tree is NULL."
  • trunk/psLib/src/sysUtils/psTrace.c

    r1718 r1731  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-08 05:59:41 $
     11 *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-08 21:22:47 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4848#include "psString.h"
    4949#include "psError.h"
    50 #include "psAbort.h"
     50#include "psLogMsg.h"
     51
     52#include "psSysUtilsErrors.h"
    5153
    5254static p_psComponent* cRoot = NULL; // The root of the trace component
     
    117119    for (i = 0; i < currentNode->n; i++) {
    118120        if (NULL == currentNode->subcomp[i]) {
    119             psError(__func__,
    120                     "Sub-component %d of node %s in the trace tree is NULL.\n", i, currentNode->name);
     121            psLogMsg(PS_ERRORNAME_DOMAIN "p_psTraceReset", PS_LOG_WARN,
     122                     PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,
     123                     i, currentNode->name);
    121124        } else {
    122125            p_psTraceReset(currentNode->subcomp[i]);
     
    141144to ANSI-C.
    142145 *****************************************************************************/
    143 static void componentAdd(const char *addNodeName, int level)
     146static bool componentAdd(const char *addNodeName, int level)
    144147{
    145148    int i = 0;                  // Loop index variable.
     
    152155    // XXX: Verify that this is the correct behavior.
    153156    if (strcmp("", addNodeName) == 0) {
    154         psAbort(__func__, "Failed to add null component to trace tree.\n");
     157        psErrorMsg(PS_ERRORNAME_DOMAIN "componentAdd",PS_ERR_BAD_PARAMETER_NULL,true,
     158                   PS_ERRORTEXT_psTrace_ADD_NULL_COMPONENT);
     159        return false;
    155160    }
    156161
     
    158163    if (strcmp(".", addNodeName) == 0) {
    159164        cRoot->level = level;
    160         return;
     165        return true;
    161166    }
    162167
    163168    if (addNodeName[0] != '.') {
    164         printf("ERROR: failed to add %s to the root component tree.\n", addNodeName);
    165         exit(1);
     169        psErrorMsg(PS_ERRORNAME_DOMAIN "componentAdd",PS_ERR_BAD_PARAMETER_VALUE,true,
     170                   PS_ERRORTEXT_psTrace_MALFORMED_COMPONENT_NAME,
     171                   addNodeName);
     172        return false;
    166173    }
    167174
     
    205212        }
    206213    }
     214
     215    return true;
    207216}
    208217
     
    218227 zero
    219228*****************************************************************************/
    220 int psTraceSetLevel(const char *comp,   // component of interest
    221                     int level)  // desired trace level
     229bool psTraceSetLevel(const char *comp,   // component of interest
     230                     int level)  // desired trace level
    222231{
    223232    // If the root component tree does not exist, then initialize it.
     
    226235    }
    227236    // Add the new component to the component tree.
    228     componentAdd(comp, level);
    229 
    230     // return 0 on success.
    231     return 0;
     237    if ( !componentAdd(comp, level) ) {
     238        psErrorMsg(PS_ERRORNAME_DOMAIN "psTraceSetLevel", PS_ERR_UNKNOWN, false,
     239                   PS_ERRORTEXT_psTrace_FAILED_TO_ADD_COMPONENT,level,comp);
     240        return false;
     241    }
     242    return true;
    232243}
    233244
     
    274285        for (i = 0; i < currentNode->n; i++) {
    275286            if (NULL == currentNode->subcomp[i]) {
    276                 psError(__func__,
    277                         "Sub-component %d of node %s in trace tree is NULL.\n", i, currentNode->name);
     287                psLogMsg(PS_ERRORNAME_DOMAIN "p_psTraceReset", PS_LOG_WARN,
     288                         PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,
     289                         i, currentNode->name);
    278290            }
    279291
     
    321333
    322334/*****************************************************************************
    323     doPrintTraceLevelsOld()
    324  This function recursively searches the component tree supplied by the
    325  parameter "comp" and prints the name and level of each component.
    326     Inputs:
    327  comp: a node in the component tree.
    328  level: the level of that node
    329     Outputs:
    330  none
    331     Returns:
    332  null
    333  *****************************************************************************/
    334 static void doPrintTraceLevelsOld(const p_psComponent* comp, int depth)
    335 {
    336     int i = 0;
    337 
    338     if (comp->name[0] == '\0') {
    339         printf("%*s%-*s %d\n", depth, "", 20 - depth,
    340                "(root)", (comp->level == PS_DEFAULT_TRACE_LEVEL) ? 0 : comp->level);
    341     } else {
    342         if (comp->level == PS_DEFAULT_TRACE_LEVEL) {
    343             printf("%*s%-*s %s\n", depth, "", 20 - depth, comp->name, ".");
    344         } else {
    345             printf("%*s%-*s %d\n", depth, "", 20 - depth, comp->name,
    346                    comp->level);
    347         }
    348     }
    349 
    350     for (i = 0; i < comp->n; i++) {
    351         doPrintTraceLevelsOld(comp->subcomp[i], depth + 1);
    352     }
    353 }
    354 
    355 /*****************************************************************************
    356335    doPrintTraceLevels()
    357336 This function recursively searches the component tree supplied by the
     
    372351
    373352    if (comp->name[0] == '\0') {
    374         psAbort(__func__, "component name is NULL\n");
     353        return;
    375354    } else {
    376355        if (comp->level == PS_DEFAULT_TRACE_LEVEL) {
     
    435414
    436415    if (NULL == comp) {
    437         psError(__func__, "p_psTrace() called on a NULL trace level tree\n");
     416        psErrorMsg(PS_ERRORNAME_DOMAIN "psTrace", PS_ERR_BAD_PARAMETER_NULL, true,
     417                   PS_ERRORTEXT_psTrace_NULL_TRACETREE,
     418                   __func__);
     419        return;
    438420    }
    439421    // Only display this message if it's trace level is less than the level
  • trunk/psLib/src/sysUtils/psTrace.h

    r1722 r1731  
    99 *  @author George Gusciora, MHPCC
    1010 *
    11  *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2004-09-08 06:07:57 $
     11 *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2004-09-08 21:22:47 $
    1313 *
    1414 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6565
    6666/// Set trace level
    67 int psTraceSetLevel(const char *facil,     ///< facilty of interest
    68                     int level)     ///< desired trace level
     67bool psTraceSetLevel(const char *facil,     ///< facilty of interest
     68                     int level)     ///< desired trace level
    6969;
    7070
Note: See TracChangeset for help on using the changeset viewer.