Index: trunk/psLib/src/astronomy/psCoord.c
===================================================================
--- trunk/psLib/src/astronomy/psCoord.c	(revision 2221)
+++ trunk/psLib/src/astronomy/psCoord.c	(revision 2273)
@@ -10,6 +10,6 @@
 *  @author George Gusciora, MHPCC
 *
-*  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-27 23:31:43 $
+*  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-11-04 01:04:57 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -27,4 +27,5 @@
 #include "psConstants.h"
 #include "psError.h"
+#include "psAstronomyErrors.h"
 #include <math.h>
 #include <float.h>
@@ -278,10 +279,16 @@
 
     } else if (projection->type == PS_PROJ_PAR) {
-        psError(__func__, "The projection type PS_PROJ_PAR is undefined.\n");
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
+                PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNDEFINED,
+                "PS_PROJ_PAR");
 
     } else if (projection->type == PS_PROJ_GLS) {
-        psError(__func__, "The projection type PS_PROJ_GLS is undefined.\n");
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
+                PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNDEFINED,
+                "PS_PROJ_GLS");
     } else {
-        psError(__func__, "Unknown projection type.\n");
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
+                PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNKNOWN,
+                projection->type);
     }
 
@@ -333,10 +340,16 @@
 
     } else if (projection->type == PS_PROJ_PAR) {
-        psError(__func__, "The projection type PS_PROJ_PAR is undefined.\n");
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
+                PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNDEFINED,
+                "PS_PROJ_PAR");
 
     } else if (projection->type == PS_PROJ_GLS) {
-        psError(__func__, "The projection type PS_PROJ_GLG is undefined.\n");
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
+                PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNDEFINED,
+                "PS_PROJ_GLS");
     } else {
-        psError(__func__, "Unknown projection type.\n");
+        psError(PS_ERR_BAD_PARAMETER_TYPE, true,
+                PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNKNOWN,
+                projection->type);
     }
 
@@ -407,5 +420,7 @@
         } else if (unit == PS_RADIAN) {}
         else {
-            psError(__func__, "Unknown offset unit: 0x%x\n", unit);
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                    PS_ERRORTEXT_psCoord_UNITS_UNKNOWN,
+                    unit);
         }
 
@@ -413,5 +428,7 @@
     }
 
-    psError(__func__, "Unrecognized offset mode\n");
+    psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+            PS_ERRORTEXT_psCoord_OFFSET_MODE_UNKNOWN,
+            mode);
     return (NULL);
 }
@@ -469,5 +486,7 @@
             tmpD = offset->d;
         } else {
-            psError(__func__, "Unknown offset unit: 0x%x\n", unit);
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+                    PS_ERRORTEXT_psCoord_UNITS_UNKNOWN,
+                    unit);
         }
 
@@ -483,5 +502,8 @@
     }
 
-    psError(__func__, "Unrecognized offset mode\n");
+    psError(PS_ERR_BAD_PARAMETER_VALUE, true,
+            PS_ERRORTEXT_psCoord_OFFSET_MODE_UNKNOWN,
+            mode);
+
     return (NULL);
 }
