Index: /trunk/psphot/src/psphotChoosePSF.c
===================================================================
--- /trunk/psphot/src/psphotChoosePSF.c	(revision 8436)
+++ /trunk/psphot/src/psphotChoosePSF.c	(revision 8437)
@@ -36,4 +36,9 @@
     }
     psLogMsg ("psphot.pspsf", 4, "selected candidate %d PSF objects\n", stars->n);
+
+    if (stars->n == 0) {
+	psError(PSPHOT_ERR_PSF, true, "Failed to find any PSF candidates");
+	return NULL;
+    }
 
     // get the fixed PSF fit radius
Index: /trunk/psphot/src/psphotErrorCodes.dat
===================================================================
--- /trunk/psphot/src/psphotErrorCodes.dat	(revision 8436)
+++ /trunk/psphot/src/psphotErrorCodes.dat	(revision 8437)
@@ -10,2 +10,3 @@
 FITS_WCS		Error interpreting FITS WCS information
 PHOTOM			Problem in photometry
+PSF			Problem in PSF
Index: /trunk/psphot/src/psphotRoughClass.c
===================================================================
--- /trunk/psphot/src/psphotRoughClass.c	(revision 8436)
+++ /trunk/psphot/src/psphotRoughClass.c	(revision 8437)
@@ -11,5 +11,8 @@
 
     // did we find a valid psfClump?
-    if (!psfClump.X || !psfClump.Y) return false;
+    if (!psfClump.X || !psfClump.Y) {
+	psError(PSPHOT_ERR_PSF, true, "Failed to find a valid PSF clump");
+	return false;
+    }
 
     // group into STAR, COSMIC, EXTENDED, SATURATED, etc.
