Index: trunk/ppSub/src/ppSubMatchPSFs.c
===================================================================
--- trunk/ppSub/src/ppSubMatchPSFs.c	(revision 26974)
+++ trunk/ppSub/src/ppSubMatchPSFs.c	(revision 26982)
@@ -56,5 +56,5 @@
     psAssert(photFile, "Need photometry file.");
     if (!pmFPACopy(photFile->fpa, ro->parent->parent->parent)) {
-        psError(PS_ERR_UNKNOWN, false, "Unable to copy FPA for photometry");
+        psError(PPSUB_ERR_CONFIG, false, "Unable to copy FPA for photometry");
         return false;
     }
@@ -170,5 +170,5 @@
     if (!pmSubtractionParamsScale(kernelSize, stampSize, kernelWidths, inFWHM, refFWHM,
                                   scaleRef, scaleMin, scaleMax)) {
-        psError(PS_ERR_UNKNOWN, false, "Unable to scale parameters.");
+        psError(PPSUB_ERR_DATA, false, "Unable to scale parameters.");
         return false;
     }
@@ -236,5 +236,5 @@
         psFree(lists);
         if (!detections->allSources) {
-            psError(PS_ERR_UNKNOWN, false, "Unable to merge source lists");
+            psError(PPSUB_ERR_DATA, false, "Unable to merge source lists");
             psFree(detections);
             return false;
@@ -262,5 +262,5 @@
     pmSubtractionKernelsType type = pmSubtractionKernelsTypeFromString(typeStr); // Type of kernel
     if (type == PM_SUBTRACTION_KERNEL_NONE) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised kernel type: %s", typeStr);
+        psError(PPSUB_ERR_ARGUMENTS, true, "Unrecognised kernel type: %s", typeStr);
         return false;
     }
@@ -319,5 +319,5 @@
             break;
           default:
-            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Invalid value for -convolve");
+            psError(PPSUB_ERR_ARGUMENTS, false, "Invalid value for -convolve");
             return false;
         }
@@ -325,5 +325,5 @@
 
     if (!subScaleKernel(data, widths, &size, &footprint)) {
-        psError(PS_ERR_UNKNOWN, false, "Unable to scale kernel parameters");
+        psError(PPSUB_ERR_DATA, false, "Unable to scale kernel parameters");
         return false;
     }
@@ -391,5 +391,5 @@
             return true;
         } else {
-            psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
+            psError(PPSUB_ERR_DATA, false, "Unable to match images.");
             return false;
         }
