WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Reraise exceptions caught in create.py, s

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Reraise exceptions caught in create.py, so that the error handling in main.py
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 07 Jun 2006 11:40:11 +0000
Delivery-date: Wed, 07 Jun 2006 04:41:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 057c5554f8c3dc7c36a4b89ecec52cbf7d917f73
# Parent  f99ba86ad96b5c19a95592fa8b0cb4dfcf02dd57
Reraise exceptions caught in create.py, so that the error handling in main.py
can handle it neatly.

Signed-off-by: Daniel Miles <daniel.t.miles@xxxxxx>
---
 tools/python/xen/xm/create.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -r f99ba86ad96b -r 057c5554f8c3 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Thu Jun 01 11:47:00 2006 +0100
+++ b/tools/python/xen/xm/create.py     Thu Jun 01 11:57:33 2006 +0100
@@ -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')
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Reraise exceptions caught in create.py, so that the error handling in main.py, Xen patchbot-unstable <=