bitkeeper revision 1.1080 (40f50d9aaH0Dd_smhBdPvYcIQFbsoA)

Improved error handling in xend and XendClient.
This commit is contained in:
mjw@wray-m-3.hpl.hp.com committed 2004-07-14 10:40:26 +00:00
1 parent 838c51889a
commit bcb3aec834
16 files changed
+224 -140

No files matched your search

+5 -4
View File
@@ -21,6 +21,7 @@ import XendDomainInfo
import XendConsole
import XendMigrate
import EventServer
from XendError import XendError
from xen.xend.server import SrvDaemon
xend = SrvDaemon.instance()
@@ -324,9 +325,9 @@ class XendDomain:
dom = int(id)
dominfo = self.domain_get(dom)
if not dominfo:
raise ValueError("Invalid domain: " + str(id))
raise XendError("Invalid domain: " + str(id))
if dominfo.config:
raise ValueError("Domain already configured: " + str(id))
raise XendError("Domain already configured: " + str(id))
def fn(dominfo):
self._add_domain(dominfo.id, dominfo)
return dominfo
@@ -575,7 +576,7 @@ class XendDomain:
dom = int(dom)
dominfo = self.domain_get(dom)
if not dominfo:
raise ValueError("invalid domain:" + str(dom))
raise XendError("invalid domain:" + str(dom))
self.refresh_schedule()
return dominfo.device_create(devconfig)
@@ -589,7 +590,7 @@ class XendDomain:
dom = int(dom)
dominfo = self.domain_get(dom)
if not dominfo:
raise ValueError("invalid domain:" + str(dom))
raise XendError("invalid domain:" + str(dom))
self.refresh_schedule()
return dominfo.device_destroy(type, idx)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.