ansible/ansible — pull request #9600 by msabramo (2014-11-24 02:15:25+00:00)
Title: Make AnsibleError a plain ol' exception

Python's `Exception` constructor already takes a `message` as a parameter, which you can then get at by doing `str(e)` (`e.message` was deprecated).

The reason I bothered to make this change was because I was debugging with pdb and I noticed that `AnsibleError`s don't give useful information in pdb (probably because they don't have a `__repr__` method that prints the `msg` attribute).

(Pdb) c
> /Users/marca/dev/git-repos/ansible/lib/ansible/runner/__init__.py(599)_executor()
-> msg = str(ae)
(Pdb) ae
AnsibleError()