add support for wrapping exceptions