Index: trunk/ppStack/src/ppStackSetup.c
===================================================================
--- trunk/ppStack/src/ppStackSetup.c	(revision 26898)
+++ trunk/ppStack/src/ppStackSetup.c	(revision 27004)
@@ -42,5 +42,5 @@
         options->statsFile = fopen(resolved, "w");
         if (!options->statsFile) {
-            psError(PS_ERR_IO, true, "Unable to open statistics file %s for writing.\n", resolved);
+            psError(PPSTACK_ERR_IO, true, "Unable to open statistics file %s for writing.\n", resolved);
             psFree(resolved);
             return false;
@@ -57,5 +57,5 @@
     }
     if (!tempDir) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Unable to find TEMP.DIR in site configuration");
+        psError(PPSTACK_ERR_CONFIG, false, "Unable to find TEMP.DIR in site configuration");
         return false;
     }
@@ -65,5 +65,5 @@
     const char *tempName = basename(outputName);
     if (!tempName) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Unable to construct basename for temporary files.");
+        psError(PPSTACK_ERR_ARGUMENTS, false, "Unable to construct basename for temporary files.");
         psFree(outputName);
         return false;
@@ -74,5 +74,5 @@
     const char *tempVariance = psMetadataLookupStr(NULL, recipe, "TEMP.VARIANCE"); // Suffix for var maps
     if (!tempImage || !tempMask || !tempVariance) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+        psError(PPSTACK_ERR_CONFIG, false,
                 "Unable to find TEMP.IMAGE, TEMP.MASK and TEMP.VARIANCE in recipe");
         psFree(outputName);
@@ -117,5 +117,5 @@
 
     if (!pmConfigMaskSetBits(NULL, NULL, config)) {
-        psError(PS_ERR_UNKNOWN, false, "Unable to determine mask value.");
+        psError(PPSTACK_ERR_CONFIG, false, "Unable to determine mask value.");
         return false;
     }
