changeset 492:56f0ad35c60a

Log errors when build master encounters an XML parse error.
author cmlenz
date Tue, 08 Jul 2008 09:58:55 +0000
parents 9bff10727d58
children f10da0985227
files bitten/master.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bitten/master.py
+++ b/bitten/master.py
@@ -103,6 +103,8 @@
         try:
             elem = xmlio.parse(req.read())
         except xmlio.ParseError, e:
+            self.log.error('Error parsing build initialization request: %s', e,
+                           exc_info=True)
             raise HTTPBadRequest('XML parser error')
 
         slavename = elem.attr['name']
@@ -190,6 +192,8 @@
         try:
             elem = xmlio.parse(req.read())
         except xmlio.ParseError, e:
+            self.log.error('Error parsing build step result: %s', e,
+                           exc_info=True)
             raise HTTPBadRequest('XML parser error')
         stepname = elem.attr['step']
 	
@@ -222,6 +226,8 @@
             step.started = int(_parse_iso_datetime(elem.attr['time']))
             step.stopped = step.started + float(elem.attr['duration'])
         except ValueError, e:
+            self.log.error('Error parsing build step timestamp: %s', e,
+                           exc_info=True)
             raise HTTPBadRequest(e.args[0])
         if elem.attr['status'] == 'failure':
             self.log.warning('Build %s step %s failed', build.id, stepname)
Copyright (C) 2012-2017 Edgewall Software