changed rethrowing code to avoid slicing exceptions #1010
Merge pull request #1017 from Tokutek/exception-slicing

changed rethrowing code to avoid slicing exceptions

fixes #1010