core, bridge: better GenericException handling
This commit is contained in:
parent
09e5cc47bb
commit
b6aaecc5c2
6 changed files with 33 additions and 11 deletions
|
|
@ -164,9 +164,9 @@ class Params(object):
|
|||
"""
|
||||
if self.storage.hasProfile(profile):
|
||||
info(_('The profile name already exists'))
|
||||
return defer.fail(Failure(u"CONFLICT"))
|
||||
return defer.fail(Failure(exceptions.ConflictError))
|
||||
if not self.host.trigger.point("ProfileCreation", profile):
|
||||
return defer.fail(Failure(u"CANCEL"))
|
||||
return defer.fail(Failure(exceptions.CancelError))
|
||||
return self.storage.createProfile(profile)
|
||||
|
||||
def deleteProfile(self, profile):
|
||||
|
|
|
|||
Loading…
Reference in a new issue