Changeset 3201

Show
Ignore:
Timestamp:
06/22/07 11:11:02 (2 years ago)
Author:
ed
Message:

Handled the NoRecordsException? in the bizobj without aborting the process. The exception is still passed up to the calling layer so that the caller (usually the UI) is aware that there are no records, and can
respond appropriately.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dabo/biz/dBizobj.py

    r3127 r3201  
    743743 
    744744        # run the requery 
     745        uiException = None 
    745746        cursor = self._CurrentCursor 
    746747        try: 
     
    756757            raise dException.DBQueryException, e 
    757758 
     759        except dException.NoRecordsException: 
     760            # No need to abort the transaction because of this, but 
     761            # we still need to pass the exception to the UI 
     762            uiException = dException.NoRecordsException 
     763             
    758764        except dException.dException, e: 
    759765            # Something failed; reset things. 
     
    770776            pass 
    771777        self.afterRequery() 
     778        if uiException: 
     779            raise uiException 
    772780 
    773781