Python 3 solution for exception chaining.