General cleanup - Exception messages and improved logging.

Stars HHC, HHC itself and Hand.

Should not get the first 100 characters of an failing hand in the log, which contains the handid for later reference.

Played around with the number of characters a while ago - 100 chars is about the sweet spot.
This commit is contained in:
Worros
2010-06-04 15:59:47 +08:00
parent 12ad272f91
commit 0c3cdb12f8
3 changed files with 10 additions and 11 deletions
+2 -4
View File
@@ -137,8 +137,7 @@ Otherwise, finish at EOF.
self.numHands += 1
except FpdbParseError, e:
self.numErrors += 1
log.warning("Failed to convert hand %s" % e.hid)
log.warning("Exception msg: '%s'" % str(e))
log.warning("HHC.start(follow): processHand failed: Exception msg: '%s'" % e)
log.debug(handText)
else:
handsList = self.allHandsAsList()
@@ -152,8 +151,7 @@ Otherwise, finish at EOF.
self.processedHands.append(self.processHand(handText))
except FpdbParseError, e:
self.numErrors += 1
log.warning("Failed to convert hand %s" % e.hid)
log.warning("Exception msg: '%s'" % str(e))
log.warning("HHC.start(): processHand failed: Exception msg: '%s'" % e)
log.debug(handText)
self.numHands = len(handsList)
endtime = time.time()