better exception wrapping