Decorator for captureException

This decorator automatically calls `captureException` in case the function raises an exception, then reraises it.