Refactor Duality exceptions