From: emellor@leeni.uk.xensource.com Date: Thu, 1 Jun 2006 10:57:33 +0000 (+0100) Subject: Reraise exceptions caught in create.py, so that the error handling in main.py X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15972^2~55 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a56b4a5a4b0095466c1e4e6387ec21e2007e5104;p=xen.git Reraise exceptions caught in create.py, so that the error handling in main.py can handle it neatly. Signed-off-by: Daniel Miles --- diff --git a/tools/python/xen/xm/create.py b/tools/python/xen/xm/create.py index fffa836896..2a6a398738 100644 --- a/tools/python/xen/xm/create.py +++ b/tools/python/xen/xm/create.py @@ -903,10 +903,15 @@ def make_domain(opts, config): else: err("%s" % ex.faultString) except Exception, ex: + # main.py has good error messages that let the user know what failed. + # unless the error is a create.py specific thing, it should be handled + # at main. The purpose of this general-case 'Exception' handler is to + # clean up create.py specific processes/data but since create.py does + # not know what to do with the error, it should pass it up. import signal if vncpid: os.kill(vncpid, signal.SIGKILL) - err(str(ex)) + raise ex dom = sxp.child_value(dominfo, 'name')