Index: trunk/ppStack/src/ppStackSources.c
===================================================================
--- trunk/ppStack/src/ppStackSources.c	(revision 26898)
+++ trunk/ppStack/src/ppStackSources.c	(revision 27004)
@@ -116,5 +116,5 @@
     psMetadata *airmassZP = psMetadataLookupMetadata(NULL, recipe, "ZP.AIRMASS"); // Airmass terms
     if (!airmassZP) {
-        psError(PS_ERR_UNKNOWN, false, "Unable to find ZP.AIRMASS in recipe.");
+        psError(PPSTACK_ERR_CONFIG, false, "Unable to find ZP.AIRMASS in recipe.");
         return false;
     }
@@ -152,5 +152,5 @@
         if (!isfinite(exptime) || exptime == 0 || !isfinite(airmass) || airmass == 0 ||
             !expFilter || strlen(expFilter) == 0) {
-            psError(PS_ERR_UNEXPECTED_NULL, false,
+            psError(PPSTACK_ERR_CONFIG, false,
                     "Unable to find exposure time (%f), airmass (%f) or filter (%s)",
                     exptime, airmass, expFilter);
@@ -163,5 +163,5 @@
             airmassTerm = psMetadataLookupF32(NULL, airmassZP, filter);
             if (!isfinite(airmassTerm)) {
-                psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                psError(PPSTACK_ERR_CONFIG, false,
                         "Unable to find airmass term (ZP.AIRMASS) for filter %s", filter);
                 psFree(zp);
@@ -169,5 +169,5 @@
             }
         } else if (strcmp(filter, expFilter) != 0) {
-            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Filters don't match: %s vs %s", filter, expFilter);
+            psError(PPSTACK_ERR_CONFIG, false, "Filters don't match: %s vs %s", filter, expFilter);
             psFree(zp);
             return false;
@@ -182,5 +182,5 @@
     psArray *matches = pmSourceMatchSources(sourceLists, radius, true); // List of matches
     if (!matches) {
-        psError(PS_ERR_UNKNOWN, false, "Unable to match sources");
+        psError(PPSTACK_ERR_DATA, false, "Unable to match sources");
         psFree(zp);
         return false;
@@ -196,5 +196,5 @@
                                                transIter, transRej, transThresh); // Transparencies per image
         if (!trans) {
-            psError(PS_ERR_UNKNOWN, false, "Unable to measure transparencies");
+            psError(PPSTACK_ERR_DATA, false, "Unable to measure transparencies");
             return false;
         }
@@ -241,5 +241,5 @@
             psArray *matches = pmSourceMatchSources(sourceLists, radius); // List of matches
             if (!matches) {
-                psError(PS_ERR_UNKNOWN, false, "Unable to match sources");
+                psError(PPSTACK_ERR_DATA, false, "Unable to match sources");
                 psFree(zp);
                 return false;
@@ -262,5 +262,5 @@
                                                   iter2, starRej2, starLimit); // Shifts for each image
         if (!offsets) {
-            psError(PS_ERR_UNKNOWN, false, "Unable to measure offsets");
+            psError(PPSTACK_ERR_DATA, false, "Unable to measure offsets");
             return false;
         }
