add ExceptionSaver and use it in a few places #299

@esmet: please review, then I'd like to merge this to master and releases/1.0