From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH] tools: make error report more verbose Date: Fri, 28 Aug 2009 16:51:17 +0200 Message-ID: <200908281651.18697.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_m7+lKgB/g+Zksqb" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_m7+lKgB/g+Zksqb Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch makes error reporting more verbose when xc.domain_create() fails or raises an Exception. Signed-off-by: Christoph Egger -- ---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 --Boundary-00=_m7+lKgB/g+Zksqb Content-Type: text/x-diff; charset="iso 8859-15"; name="xen_python_dominfo.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_python_dominfo.diff" diff -r 1afd9142eed3 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Wed Aug 19 12:52:38 2009 +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Fri Aug 28 16:46:24 2009 +0200 @@ -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) --Boundary-00=_m7+lKgB/g+Zksqb Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_m7+lKgB/g+Zksqb--