Skip to contentSkip to conversation

tools: make error report more verbose

PATCH New Christoph Egger 1 participant 1 message Aug 28, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: make error report more verbose

Hi!

Attached patch makes error reporting more verbose when xc.domain_create() fails or raises an Exception.

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
tools/python/xen/xend/XendDomainInfo.py +7 -4
diff -r 1afd9142eed3 tools/python/xen/xend/XendDomainInfo.py
@@ -2400,10 +2402,13 @@ class XendDomainInfo:
             # may get here if due to ACM the operation is not permitted
             if security.on() == xsconstants.XS_POLICY_ACM:
                 raise VmError('Domain in conflict set with running domain?')
-
-        if self.domid < 0:
-            raise VmError('Creating domain failed: name=%s' %
-                          self.info['name_label'])
+            log.exception(e)
+
+        if not self.domid or self.domid < 0:
+            str = 'Creating domain failed: name=%s' % self.info['name_label']
+            if self.domid:
+                str += ', error=%i' % int(self.domid)
+            raise VmError(str)
 
         self.dompath = GetDomainPath(self.domid)
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel