Index: trunk/psLib/src/collections/psScalar.c
===================================================================
--- trunk/psLib/src/collections/psScalar.c	(revision 1648)
+++ trunk/psLib/src/collections/psScalar.c	(revision 1807)
@@ -1,3 +1,2 @@
-
 /** @file  psScalar.c
  *
@@ -9,15 +8,10 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-27 23:34:05 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
 
-/******************************************************************************/
-
-/*  INCLUDE FILES                                                             */
-
-/******************************************************************************/
 #include "psMemory.h"
 #include "psError.h"
@@ -26,49 +20,6 @@
 #include "psAbort.h"
 
-/******************************************************************************/
+#include "psCollectionsErrors.h"
 
-/*  DEFINE STATEMENTS                                                         */
-
-/******************************************************************************/
-
-// None
-
-/******************************************************************************/
-
-/*  TYPE DEFINITIONS                                                          */
-
-/******************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  GLOBAL VARIABLES                                                         */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FILE STATIC VARIABLES                                                    */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FUNCTION IMPLEMENTATION - LOCAL                                          */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
-
-/*****************************************************************************/
 psScalar* psScalarAlloc(psC64 value, psElemType dataType)
 {
@@ -77,7 +28,4 @@
     // Create scalar
     scalar = (psScalar* ) psAlloc(sizeof(psScalar));
-    if (scalar == NULL) {
-        psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);
-    }
 
     scalar->type.dimen = PS_DIMEN_SCALAR;
@@ -122,5 +70,8 @@
         break;
     default:
-        psError(__func__, ": Line %d - Invalid PS_TYPE: %d", __LINE__, dataType);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarAlloc",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE,
+                   dataType);
     }
 
@@ -134,5 +85,8 @@
 
     if (scalar == NULL) {
-        psError(__func__, "Null scalar not allowed");
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarCopy",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psScalar_COPY_NULL);
+        return NULL;
     }
 
@@ -176,5 +130,8 @@
         break;
     default:
-        psError(__func__, ": Line %d - Invalid PS_TYPE: %d", __LINE__, dataType);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarCopy",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE,
+                   dataType);
     }
 
