IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 16, 2012, 12:18:37 PM (14 years ago)
Author:
rhenders
Message:

improvements to exception handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/batch.py

    r33672 r33787  
    3939                 useFullTables):
    4040
    41         self.everythingOK = False
    4241        self.readHeader = False
    4342        self.config = config
     
    6665            if not self.header:
    6766                logger.errorPair("Could not read FITS for id", "%d" % id)
    68                 return
     67                raise
    6968
    7069        self.scratchDb.setUseFullTables(self.useFullTables)
     
    115114        self.logger.infoPair("Output path", self.localOutPath)
    116115
    117         self.everythingOK = True
    118116   
    119117    '''
     
    510508    def run(self):
    511509
    512         if not self.everythingOK:
    513             self.logger.errorPair("Aborting this batch", "could not initialize")
    514             self.ippToPspsDb.updateProcessed(self.batchID, -1)
    515             return
    516 
    517510        if not self.createEmptyPspsTables():
    518511            self.logger.errorPair("Aborting this batch", "could not create empty PSPS tables")
    519512            self.ippToPspsDb.updateProcessed(self.batchID, -1)
    520             return
     513            raise
    521514
    522515        if not self.importIppTables():
    523516            self.logger.errorPair("Aborting this batch", "could not import IPP tables")
    524517            self.ippToPspsDb.updateProcessed(self.batchID, -1)
    525             return
     518            raise
    526519
    527520        if not self.populatePspsTables():
    528521            self.logger.errorPair("Aborting this batch", "unable to populate PSPS tables")
    529522            self.ippToPspsDb.updateProcessed(self.batchID, -1)
    530             return
     523            raise
    531524
    532525        if not self.exportPspsTablesToFits():
    533526            self.logger.errorPair("Aborting this batch", "unable to export tables to FITS file")
    534527            self.ippToPspsDb.updateProcessed(self.batchID, -1)
    535             return
     528            raise
    536529   
    537530        if self.writeBatchManifest():
Note: See TracChangeset for help on using the changeset viewer.