Index: trunk/glueforge/templates/psdb/popfits.tt
===================================================================
--- trunk/glueforge/templates/psdb/popfits.tt	(revision 4277)
+++ trunk/glueforge/templates/psdb/popfits.tt	(revision 4341)
@@ -4,5 +4,5 @@
 
     if (!fooSelectRowsFits(dbh, fits, NULL, limit)) {
-        // psError(); something bad happened
+        psError(PS_ERR_UNKNOWN, true, "database error or table is empty");
         return false;
     }
@@ -12,10 +12,10 @@
                 "DELETE FROM %s ORDER BY %s DESC LIMIT %lld",
                 [% namespace FILTER upper %]_TABLE_NAME, [% namespace FILTER upper %]_INDEX_NAME, limit) < 0) {
-        // psError(); something bad happened
+        psError(PS_ERR_UNKNOWN, true, "query value attempted to exceed %s bytes", MAX_STRING_LENGTH);
         return false;
     }
             
     if (!p_psDBRunQuery(dbh, query)) {
-        // psError(); something bad happened
+        psError(PS_ERR_UNKNOWN, false, "database query failed");
         return false;
     }
