cloudstack: add catch all exceptions and show a user friendly message

Also see GH-493.
This commit is contained in:
Rene Moser 2015-05-16 11:45:48 +02:00 committed by Matt Clay
parent e03827b490
commit 6d1873f330
11 changed files with 33 additions and 0 deletions

View file

@ -242,6 +242,9 @@ def main():
except CloudStackException, e:
module.fail_json(msg='CloudStackException: %s' % str(e))
except Exception, e:
module.fail_json(msg='Exception: %s' % str(e))
module.exit_json(**result)
# import module snippets