Index: /trunk/psLib/src/sys/psErrorCodes.c
===================================================================
--- /trunk/psLib/src/sys/psErrorCodes.c	(revision 1712)
+++ /trunk/psLib/src/sys/psErrorCodes.c	(revision 1713)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-07 19:05:07 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -34,9 +34,11 @@
             {PS_ERR_UNKNOWN,"unknown error"},
             {PS_ERR_IO,"I/O error"},
+            {PS_ERR_LOCATION_INVALID,"specified location is unknown"},
             {PS_ERR_MEMORY_CORRUPTION,"memory corruption detected"},
             {PS_ERR_MEMORY_DEREF_USAGE,"dereferenced memory still used"},
-            {PS_ERR_LOCATION_INVALID,"specified location is unknown"},
-            {PS_ERR_BAD_VALUE,"value is out-of-range"},
-            {PS_ERR_BAD_LENGTH,"string value is too lon"},
+            {PS_ERR_BAD_PARAMETER_VALUE,"parameter is out-of-range"},
+            {PS_ERR_BAD_PARAMETER_NULL,"parameter is null"},
+            {PS_ERR_BAD_PARAMETER_LENGTH,"parameter string is too long"},
+            {PS_ERR_UNEXPECTED_NULL,"unexpected NULL foun"},
             //~End
             {PS_ERR_N_ERR_CLASSES,"error classes end marker"}
Index: /trunk/psLib/src/sys/psErrorCodes.h
===================================================================
--- /trunk/psLib/src/sys/psErrorCodes.h	(revision 1712)
+++ /trunk/psLib/src/sys/psErrorCodes.h	(revision 1713)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-07 19:05:07 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -43,9 +43,11 @@
     PS_ERR_UNKNOWN,   ///< unknown error
     PS_ERR_IO,   ///< I/O error
+    PS_ERR_LOCATION_INVALID,   ///< specified location is unknown
     PS_ERR_MEMORY_CORRUPTION,   ///< memory corruption detected
     PS_ERR_MEMORY_DEREF_USAGE,   ///< dereferenced memory still used
-    PS_ERR_LOCATION_INVALID,   ///< specified location is unknown
-    PS_ERR_BAD_VALUE,   ///< value is out-of-range
-    PS_ERR_BAD_LENGTH,   ///< string value is too lon
+    PS_ERR_BAD_PARAMETER_VALUE,   ///< parameter is out-of-range
+    PS_ERR_BAD_PARAMETER_NULL,   ///< parameter is null
+    PS_ERR_BAD_PARAMETER_LENGTH,   ///< parameter string is too long
+    PS_ERR_UNEXPECTED_NULL,   ///< unexpected NULL foun
     //~End
     PS_ERR_N_ERR_CLASSES               ///< end marker - should not be used as a true error
Index: /trunk/psLib/src/sys/psLogMsg.c
===================================================================
--- /trunk/psLib/src/sys/psLogMsg.c	(revision 1712)
+++ /trunk/psLib/src/sys/psLogMsg.c	(revision 1713)
@@ -12,6 +12,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-07 19:05:07 $
+ *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -218,5 +218,5 @@
             break;
         default:
-            psErrorMsg(ERRORNAME_PREFIX "psLogSetFormat", true, PS_ERR_BAD_VALUE,
+            psErrorMsg(ERRORNAME_PREFIX "psLogSetFormat", true, PS_ERR_BAD_PARAMETER_VALUE,
                        PS_ERRORTEXT_psLogSetFormat_UNKNOWN_KEY, *ptr);
             break;
Index: /trunk/psLib/src/sys/psString.c
===================================================================
--- /trunk/psLib/src/sys/psString.c	(revision 1712)
+++ /trunk/psLib/src/sys/psString.c	(revision 1713)
@@ -9,15 +9,10 @@
  *  @author Eric Van Alst, MHPCC
  *   
- *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-07 00:06:06 $
+ *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
 
-/******************************************************************************/
-
-/*  INCLUDE FILES                                                             */
-
-/******************************************************************************/
 #include <stdlib.h>
 #include <string.h>
@@ -26,49 +21,6 @@
 #include "psError.h"
 
-/******************************************************************************/
-
-/*  DEFINE STATEMENTS                                                         */
-
-/******************************************************************************/
-
-// None
-
-/******************************************************************************/
-
-/*  TYPE DEFINITIONS                                                          */
-
-/******************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  GLOBAL VARIABLES                                                         */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FILE STATIC VARIABLES                                                    */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FUNCTION IMPLEMENTATION - LOCAL                                          */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
-
-/*****************************************************************************/
+#include "psSysUtilsErrors.h"
+#define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psString."
 
 char *psStringCopy(const char *str)
@@ -87,5 +39,7 @@
     if (nChar < 0) {
         // Log error message and return NULL
-        psError(__FILE__, "psStringNCopy with negative count specified %d", nChar);
+        psErrorMsg(ERRORNAME_PREFIX "psStringNCopy", PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psStringNCopy_NCHAR_NEGATIVE,
+                   nChar);
         return NULL;
     }
Index: /trunk/psLib/src/sys/psTrace.c
===================================================================
--- /trunk/psLib/src/sys/psTrace.c	(revision 1712)
+++ /trunk/psLib/src/sys/psTrace.c	(revision 1713)
@@ -9,6 +9,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-07 19:58:06 $
+ *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -40,5 +40,8 @@
 #include "psString.h"
 #include "psError.h"
-#include "psAbort.h"
+#include "psLogMsg.h"
+
+#include "psSysUtilsErrors.h"
+#define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psTrace."
 
 static p_psComponent* cRoot = NULL; // The root of the trace component
@@ -107,6 +110,7 @@
     for (i = 0; i < currentNode->n; i++) {
         if (NULL == currentNode->subcomp[i]) {
-            psError(__func__,
-                    "Sub-component %d of node %s in the trace tree is NULL.\n", i, currentNode->name);
+            psLogMsg(ERRORNAME_PREFIX "p_psTraceReset", PS_LOG_WARN,
+                     PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,
+                     i, currentNode->name);
         } else {
             p_psTraceReset(currentNode->subcomp[i]);
@@ -131,5 +135,5 @@
 to ANSI-C.
  *****************************************************************************/
-static void componentAdd(const char *addNodeName, int level)
+static bool componentAdd(const char *addNodeName, int level)
 {
     int i = 0;                  // Loop index variable.
@@ -142,5 +146,7 @@
     // XXX: Verify that this is the correct behavior.
     if (strcmp("", addNodeName) == 0) {
-        psAbort(__func__, "Failed to add null component to trace tree.\n");
+        psErrorMsg(ERRORNAME_PREFIX "componentAdd",PS_ERR_BAD_PARAMETER_NULL,true,
+                   PS_ERRORTEXT_psTrace_ADD_NULL_COMPONENT);
+        return false;
     }
 
@@ -148,10 +154,12 @@
     if (strcmp(".", addNodeName) == 0) {
         cRoot->level = level;
-        return;
+        return true;
     }
 
     if (addNodeName[0] != '.') {
-        psAbort(__func__,"Failed to add %s to the root component tree.\n",
-                addNodeName);
+        psErrorMsg(ERRORNAME_PREFIX "componentAdd",PS_ERR_BAD_PARAMETER_VALUE,true,
+                   PS_ERRORTEXT_psTrace_MALFORMED_COMPONENT_NAME,
+                   addNodeName);
+        return false;
     }
 
@@ -188,4 +196,6 @@
         }
     }
+
+    return true;
 }
 
@@ -201,6 +211,6 @@
  zero
 *****************************************************************************/
-int psTraceSetLevel(const char *comp,   // component of interest
-                    int level)  // desired trace level
+bool psTraceSetLevel(const char *comp,   // component of interest
+                     int level)  // desired trace level
 {
     // If the root component tree does not exist, then initialize it.
@@ -209,8 +219,11 @@
     }
     // Add the new component to the component tree.
-    componentAdd(comp, level);
-
+    if ( !componentAdd(comp, level) ) {
+        psErrorMsg(ERRORNAME_PREFIX "psTraceSetLevel", PS_ERR_UNKNOWN, false,
+                   PS_ERRORTEXT_psTrace_FAILED_TO_ADD_COMPONENT,level,comp);
+        return false;
+    }
     // return 0 on success.
-    return 0;
+    return true;
 }
 
@@ -255,6 +268,7 @@
         for (i = 0; i < currentNode->n; i++) {
             if (NULL == currentNode->subcomp[i]) {
-                psError(__func__,
-                        "Sub-component %d of node %s in trace tree is NULL.\n", i, currentNode->name);
+                psLogMsg(ERRORNAME_PREFIX "p_psTraceReset", PS_LOG_WARN,
+                         PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,
+                         i, currentNode->name);
             }
 
@@ -365,5 +379,8 @@
 
     if (NULL == comp) {
-        psError(__func__, "p_psTrace() called on a NULL trace level tree\n");
+        psErrorMsg(ERRORNAME_PREFIX "psTrace", PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psTrace_NULL_TRACETREE,
+                   __func__);
+        return;
     }
     // Only display this message if it's trace level is less than the level
Index: /trunk/psLib/src/sys/psTrace.h
===================================================================
--- /trunk/psLib/src/sys/psTrace.h	(revision 1712)
+++ /trunk/psLib/src/sys/psTrace.h	(revision 1713)
@@ -10,6 +10,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-27 21:45:01 $
+ *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -66,6 +66,6 @@
 
 /// Set trace level
-int psTraceSetLevel(const char *facil,     ///< facilty of interest
-                    int level)     ///< desired trace level
+bool psTraceSetLevel(const char *facil,     ///< facilty of interest
+                     int level)     ///< desired trace level
 ;
 
Index: /trunk/psLib/src/sysUtils/parseErrorCodes.pl
===================================================================
--- /trunk/psLib/src/sysUtils/parseErrorCodes.pl	(revision 1712)
+++ /trunk/psLib/src/sysUtils/parseErrorCodes.pl	(revision 1713)
@@ -34,5 +34,5 @@
     }
     else {
-        /^\s*(\w+)\s+(\w.*)/;
+        /^\s*(\w+)\s+([\%\w].*)/;
         my $ErrorCode        = $1;
         my $ErrorDescription = $2;
Index: /trunk/psLib/src/sysUtils/psErrorCodes.c
===================================================================
--- /trunk/psLib/src/sysUtils/psErrorCodes.c	(revision 1712)
+++ /trunk/psLib/src/sysUtils/psErrorCodes.c	(revision 1713)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-07 19:05:07 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -34,9 +34,11 @@
             {PS_ERR_UNKNOWN,"unknown error"},
             {PS_ERR_IO,"I/O error"},
+            {PS_ERR_LOCATION_INVALID,"specified location is unknown"},
             {PS_ERR_MEMORY_CORRUPTION,"memory corruption detected"},
             {PS_ERR_MEMORY_DEREF_USAGE,"dereferenced memory still used"},
-            {PS_ERR_LOCATION_INVALID,"specified location is unknown"},
-            {PS_ERR_BAD_VALUE,"value is out-of-range"},
-            {PS_ERR_BAD_LENGTH,"string value is too lon"},
+            {PS_ERR_BAD_PARAMETER_VALUE,"parameter is out-of-range"},
+            {PS_ERR_BAD_PARAMETER_NULL,"parameter is null"},
+            {PS_ERR_BAD_PARAMETER_LENGTH,"parameter string is too long"},
+            {PS_ERR_UNEXPECTED_NULL,"unexpected NULL foun"},
             //~End
             {PS_ERR_N_ERR_CLASSES,"error classes end marker"}
Index: /trunk/psLib/src/sysUtils/psErrorCodes.dat
===================================================================
--- /trunk/psLib/src/sysUtils/psErrorCodes.dat	(revision 1712)
+++ /trunk/psLib/src/sysUtils/psErrorCodes.dat	(revision 1713)
@@ -9,7 +9,9 @@
 UNKNOWN                        unknown error
 IO                             I/O error
+LOCATION_INVALID               specified location is unknown
 MEMORY_CORRUPTION              memory corruption detected
 MEMORY_DEREF_USAGE             dereferenced memory still used
-LOCATION_INVALID               specified location is unknown
-BAD_VALUE                      value is out-of-range
-BAD_LENGTH                     string value is too long
+BAD_PARAMETER_VALUE            parameter is out-of-range
+BAD_PARAMETER_NULL             parameter is null
+BAD_PARAMETER_LENGTH           parameter string is too long
+UNEXPECTED_NULL                unexpected NULL found
Index: /trunk/psLib/src/sysUtils/psErrorCodes.h
===================================================================
--- /trunk/psLib/src/sysUtils/psErrorCodes.h	(revision 1712)
+++ /trunk/psLib/src/sysUtils/psErrorCodes.h	(revision 1713)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-07 19:05:07 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -43,9 +43,11 @@
     PS_ERR_UNKNOWN,   ///< unknown error
     PS_ERR_IO,   ///< I/O error
+    PS_ERR_LOCATION_INVALID,   ///< specified location is unknown
     PS_ERR_MEMORY_CORRUPTION,   ///< memory corruption detected
     PS_ERR_MEMORY_DEREF_USAGE,   ///< dereferenced memory still used
-    PS_ERR_LOCATION_INVALID,   ///< specified location is unknown
-    PS_ERR_BAD_VALUE,   ///< value is out-of-range
-    PS_ERR_BAD_LENGTH,   ///< string value is too lon
+    PS_ERR_BAD_PARAMETER_VALUE,   ///< parameter is out-of-range
+    PS_ERR_BAD_PARAMETER_NULL,   ///< parameter is null
+    PS_ERR_BAD_PARAMETER_LENGTH,   ///< parameter string is too long
+    PS_ERR_UNEXPECTED_NULL,   ///< unexpected NULL foun
     //~End
     PS_ERR_N_ERR_CLASSES               ///< end marker - should not be used as a true error
Index: /trunk/psLib/src/sysUtils/psLogMsg.c
===================================================================
--- /trunk/psLib/src/sysUtils/psLogMsg.c	(revision 1712)
+++ /trunk/psLib/src/sysUtils/psLogMsg.c	(revision 1713)
@@ -12,6 +12,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-07 19:05:07 $
+ *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -218,5 +218,5 @@
             break;
         default:
-            psErrorMsg(ERRORNAME_PREFIX "psLogSetFormat", true, PS_ERR_BAD_VALUE,
+            psErrorMsg(ERRORNAME_PREFIX "psLogSetFormat", true, PS_ERR_BAD_PARAMETER_VALUE,
                        PS_ERRORTEXT_psLogSetFormat_UNKNOWN_KEY, *ptr);
             break;
Index: /trunk/psLib/src/sysUtils/psString.c
===================================================================
--- /trunk/psLib/src/sysUtils/psString.c	(revision 1712)
+++ /trunk/psLib/src/sysUtils/psString.c	(revision 1713)
@@ -9,15 +9,10 @@
  *  @author Eric Van Alst, MHPCC
  *   
- *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-07 00:06:06 $
+ *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
 
-/******************************************************************************/
-
-/*  INCLUDE FILES                                                             */
-
-/******************************************************************************/
 #include <stdlib.h>
 #include <string.h>
@@ -26,49 +21,6 @@
 #include "psError.h"
 
-/******************************************************************************/
-
-/*  DEFINE STATEMENTS                                                         */
-
-/******************************************************************************/
-
-// None
-
-/******************************************************************************/
-
-/*  TYPE DEFINITIONS                                                          */
-
-/******************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  GLOBAL VARIABLES                                                         */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FILE STATIC VARIABLES                                                    */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FUNCTION IMPLEMENTATION - LOCAL                                          */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
-
-/*****************************************************************************/
+#include "psSysUtilsErrors.h"
+#define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psString."
 
 char *psStringCopy(const char *str)
@@ -87,5 +39,7 @@
     if (nChar < 0) {
         // Log error message and return NULL
-        psError(__FILE__, "psStringNCopy with negative count specified %d", nChar);
+        psErrorMsg(ERRORNAME_PREFIX "psStringNCopy", PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psStringNCopy_NCHAR_NEGATIVE,
+                   nChar);
         return NULL;
     }
Index: /trunk/psLib/src/sysUtils/psSysUtilsErrors.dat
===================================================================
--- /trunk/psLib/src/sysUtils/psSysUtilsErrors.dat	(revision 1712)
+++ /trunk/psLib/src/sysUtils/psSysUtilsErrors.dat	(revision 1713)
@@ -22,2 +22,14 @@
 checkMemBlock_OVERFLOW                         Memory block %ld is corrupted; buffer overflow detected.
 memProblemCallbackDefault_MULTIPLE_FREE        Block %ld allocated at %s:%d freed more than once at %s:%d.
+#
+# Error Messages from psString.c:
+#
+psString_NCHAR_NEGATIVE                        Can not copy a negative number of characters (%d).
+#
+# Error Messages from psTrace.c:
+#
+psTrace_NULL_SUBCOMPONENT                      Sub-component %d of node %s in trace tree is NULL.
+psTrace_NULL_TRACETREE                         Function %s called on a NULL trace level tree.
+psTrace_ADD_NULL_COMPONENT                     Failed to add null component to trace tree.
+psTrace_MALFORMED_COMPONENT_NAME               Failed to add '%s' to the root component tree; component must start with '.'.
+psTrace_FAILED_TO_ADD_COMPONENT                Failed to set trace level (%d) to '%s'.
Index: /trunk/psLib/src/sysUtils/psSysUtilsErrors.h
===================================================================
--- /trunk/psLib/src/sysUtils/psSysUtilsErrors.h	(revision 1712)
+++ /trunk/psLib/src/sysUtils/psSysUtilsErrors.h	(revision 1713)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-07 19:05:07 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -39,5 +39,11 @@
 #define PS_ERRORTEXT_checkMemBlock_UNDERFLOW "Memory block %ld is corrupted; buffer underflow detected."
 #define PS_ERRORTEXT_checkMemBlock_OVERFLOW "Memory block %ld is corrupted; buffer overflow detected."
-#define PS_ERRORTEXT_memProblemCallbackDefault_MULTIPLE_FREE "Block %ld allocated at %s:%d freed more than once at %s:%d"
+#define PS_ERRORTEXT_memProblemCallbackDefault_MULTIPLE_FREE "Block %ld allocated at %s:%d freed more than once at %s:%d."
+#define PS_ERRORTEXT_psString_NCHAR_NEGATIVE "Can not copy a negative number of characters (%d)."
+#define PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT "Sub-component %d of node %s in trace tree is NULL."
+#define PS_ERRORTEXT_psTrace_NULL_TRACETREE "Function %s called on a NULL trace level tree."
+#define PS_ERRORTEXT_psTrace_ADD_NULL_COMPONENT "Failed to add null component to trace tree."
+#define PS_ERRORTEXT_psTrace_MALFORMED_COMPONENT_NAME "Failed to add '%s' to the root component tree; component must start with '.'."
+#define PS_ERRORTEXT_psTrace_FAILED_TO_ADD_COMPONENT "Failed to set trace level (%d) to '%s'"
 //~End
 
Index: /trunk/psLib/src/sysUtils/psTrace.c
===================================================================
--- /trunk/psLib/src/sysUtils/psTrace.c	(revision 1712)
+++ /trunk/psLib/src/sysUtils/psTrace.c	(revision 1713)
@@ -9,6 +9,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-07 19:58:06 $
+ *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -40,5 +40,8 @@
 #include "psString.h"
 #include "psError.h"
-#include "psAbort.h"
+#include "psLogMsg.h"
+
+#include "psSysUtilsErrors.h"
+#define ERRORNAME_PREFIX PS_ERRORNAME_DOMAIN ".psTrace."
 
 static p_psComponent* cRoot = NULL; // The root of the trace component
@@ -107,6 +110,7 @@
     for (i = 0; i < currentNode->n; i++) {
         if (NULL == currentNode->subcomp[i]) {
-            psError(__func__,
-                    "Sub-component %d of node %s in the trace tree is NULL.\n", i, currentNode->name);
+            psLogMsg(ERRORNAME_PREFIX "p_psTraceReset", PS_LOG_WARN,
+                     PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,
+                     i, currentNode->name);
         } else {
             p_psTraceReset(currentNode->subcomp[i]);
@@ -131,5 +135,5 @@
 to ANSI-C.
  *****************************************************************************/
-static void componentAdd(const char *addNodeName, int level)
+static bool componentAdd(const char *addNodeName, int level)
 {
     int i = 0;                  // Loop index variable.
@@ -142,5 +146,7 @@
     // XXX: Verify that this is the correct behavior.
     if (strcmp("", addNodeName) == 0) {
-        psAbort(__func__, "Failed to add null component to trace tree.\n");
+        psErrorMsg(ERRORNAME_PREFIX "componentAdd",PS_ERR_BAD_PARAMETER_NULL,true,
+                   PS_ERRORTEXT_psTrace_ADD_NULL_COMPONENT);
+        return false;
     }
 
@@ -148,10 +154,12 @@
     if (strcmp(".", addNodeName) == 0) {
         cRoot->level = level;
-        return;
+        return true;
     }
 
     if (addNodeName[0] != '.') {
-        psAbort(__func__,"Failed to add %s to the root component tree.\n",
-                addNodeName);
+        psErrorMsg(ERRORNAME_PREFIX "componentAdd",PS_ERR_BAD_PARAMETER_VALUE,true,
+                   PS_ERRORTEXT_psTrace_MALFORMED_COMPONENT_NAME,
+                   addNodeName);
+        return false;
     }
 
@@ -188,4 +196,6 @@
         }
     }
+
+    return true;
 }
 
@@ -201,6 +211,6 @@
  zero
 *****************************************************************************/
-int psTraceSetLevel(const char *comp,   // component of interest
-                    int level)  // desired trace level
+bool psTraceSetLevel(const char *comp,   // component of interest
+                     int level)  // desired trace level
 {
     // If the root component tree does not exist, then initialize it.
@@ -209,8 +219,11 @@
     }
     // Add the new component to the component tree.
-    componentAdd(comp, level);
-
+    if ( !componentAdd(comp, level) ) {
+        psErrorMsg(ERRORNAME_PREFIX "psTraceSetLevel", PS_ERR_UNKNOWN, false,
+                   PS_ERRORTEXT_psTrace_FAILED_TO_ADD_COMPONENT,level,comp);
+        return false;
+    }
     // return 0 on success.
-    return 0;
+    return true;
 }
 
@@ -255,6 +268,7 @@
         for (i = 0; i < currentNode->n; i++) {
             if (NULL == currentNode->subcomp[i]) {
-                psError(__func__,
-                        "Sub-component %d of node %s in trace tree is NULL.\n", i, currentNode->name);
+                psLogMsg(ERRORNAME_PREFIX "p_psTraceReset", PS_LOG_WARN,
+                         PS_ERRORTEXT_psTrace_NULL_SUBCOMPONENT,
+                         i, currentNode->name);
             }
 
@@ -365,5 +379,8 @@
 
     if (NULL == comp) {
-        psError(__func__, "p_psTrace() called on a NULL trace level tree\n");
+        psErrorMsg(ERRORNAME_PREFIX "psTrace", PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psTrace_NULL_TRACETREE,
+                   __func__);
+        return;
     }
     // Only display this message if it's trace level is less than the level
Index: /trunk/psLib/src/sysUtils/psTrace.h
===================================================================
--- /trunk/psLib/src/sysUtils/psTrace.h	(revision 1712)
+++ /trunk/psLib/src/sysUtils/psTrace.h	(revision 1713)
@@ -10,6 +10,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-27 21:45:01 $
+ *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-08 00:09:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -66,6 +66,6 @@
 
 /// Set trace level
-int psTraceSetLevel(const char *facil,     ///< facilty of interest
-                    int level)     ///< desired trace level
+bool psTraceSetLevel(const char *facil,     ///< facilty of interest
+                     int level)     ///< desired trace level
 ;
 
