Implement changes in order to preserve call stack as much as possible when rethrowing exceptions.