Index: /branches/eam_branches/ipp-20140717/ippToPsps/jython/detectionbatch.py
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/jython/detectionbatch.py	(revision 37240)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/jython/detectionbatch.py	(revision 37241)
@@ -381,7 +381,9 @@
 
         sql = sqlLine.makeRaw(") SELECT ", " FROM " + ippTableName)
-        print "sql: " + sql
-
-        self.scratchDb.execute(sql)
+
+        try: self.scratchDb.execute(sql)
+        except:
+            self.logger.errorPair("failed sql: ", sql)
+            raise
 
         # NOTE : Flux limits : in the current PSPS schema, negative fluxes 
Index: /branches/eam_branches/ipp-20140717/ippToPsps/jython/mysql.py
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/jython/mysql.py	(revision 37240)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/jython/mysql.py	(revision 37241)
@@ -83,5 +83,5 @@
     '''
     def lockTable(self, table):
-        print "Locking table: " + table
+        # print "Locking table: " + table
         self.execute("LOCK TABLES " + table + " WRITE")
 
@@ -90,5 +90,5 @@
     '''
     def unlockTables(self):
-        print "Unlocking tables"
+        # print "Unlocking tables"
         self.execute("UNLOCK TABLES")
 
@@ -117,5 +117,5 @@
         while (rs.next()):
             tableName = rs.getString(1)
-            print "table: " + tableName
+            # print "table: " + tableName
         rs.close()
 
Index: /branches/eam_branches/ipp-20140717/ippToPsps/jython/objectbatch.py
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/jython/objectbatch.py	(revision 37240)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/jython/objectbatch.py	(revision 37241)
@@ -155,6 +155,8 @@
 
 
-            self.logger.info(sql)
-            self.scratchDb.execute(sql)
+            try: self.scratchDb.execute(sql)
+            except:
+                self.logger.errorPair("failed update MeanObject", sql)
+                raise
 
         # now set to null all MeanMagErr values > 0.5 (cut set by Gene, 2012-04-12)
Index: /branches/eam_branches/ipp-20140717/ippToPsps/jython/scratchdb.py
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/jython/scratchdb.py	(revision 37240)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/jython/scratchdb.py	(revision 37241)
@@ -427,6 +427,5 @@
             # if no returned rows, return an error
             if not rs.next():
-                print "DVO lacks imageID ", imageID
-                print "sql: ", sql
+                self.logger.infoPair("DVO lacks imageID ", imageID)
                 return False
 
@@ -436,7 +435,8 @@
 
             else:
-                print "DVO has wrong imageID? ", imageID
-                print "result was ", rs.getInt(1)
-                print "sql: ", sql
+                self.logger.error("DVO has wrong imageID? ")
+                self.logger.error("imageID: ", imageID)
+                self.logger.error("EXTERN_ID: ", rs.getInt(1))
+                self.logger.infoPair("sql: ", sql)
                 raise
 
Index: /branches/eam_branches/ipp-20140717/ippToPsps/jython/stackbatch.py
===================================================================
--- /branches/eam_branches/ipp-20140717/ippToPsps/jython/stackbatch.py	(revision 37240)
+++ /branches/eam_branches/ipp-20140717/ippToPsps/jython/stackbatch.py	(revision 37241)
@@ -329,5 +329,4 @@
             sqlLine.group("a."+filter+"infoFlag2",     "(b.flags << 13)")
             sql = sqlLine.makeEquals("WHERE a.objID = b.objID AND b.imageID = " + str(imageID))
-            self.logger.infoPair('sql', sql)     
 
             try: self.scratchDb.execute(sql)
@@ -351,5 +350,4 @@
 
             sql = sqlLine.makeEquals("WHERE a." + filter + "ippDetectID=b.IPP_IDET")
-            self.logger.infoPair('sql', sql)     
 
             # index the (f)ippDetectIDs for the next steps?
@@ -428,5 +426,4 @@
             sql = sqlLine.makeEquals("WHERE a." + filter + "ippDetectID = b.IPP_IDET")
 
-            self.logger.infoPair('sql', sql)     
             try:
                 self.scratchDb.execute(sql)
@@ -445,5 +442,4 @@
             sql = sqlLine.makeEquals("WHERE a.objID = b.objID AND a." + filter + "ippDetectID = b.ippDetectID")
 
-            self.logger.infoPair('sql', sql)     
             try:
                 self.scratchDb.execute(sql)
@@ -558,5 +554,4 @@
         sql = sqlLine.makeEquals("WHERE a.objID = b.objID AND a." + filter + "ippDetectID = b.ippDetectID")
 
-        self.logger.infoPair('sql', sql)     
         try:
             self.scratchDb.execute(sql)
@@ -597,5 +592,4 @@
         sql = sqlLine.makeEquals("WHERE a.objID = b.objID AND a.objID = c.objID")
 
-        self.logger.infoPair('sql', sql)     
         try:
             self.scratchDb.execute(sql)
@@ -817,5 +811,5 @@
             
         sql = sqlLine.makeEquals("WHERE a." + filter + "ippDetectID = b.IPP_IDET AND  " + psfCondition)
-        self.logger.infoPair("sql",sql)
+
         self.scratchDb.execute(sql)
 
@@ -840,5 +834,4 @@
             sqlLine.group(field + "Std",       field + "Std" + " * POW(10, 3.56 - 0.4* b.zp)")
         sql = sqlLine.makeEquals("WHERE a.objID = b.objID AND a." + filter + "ippDetectID = b.ippDetectID")
-        self.logger.infoPair("sql",sql)
         self.scratchDb.execute(sql)
 
