not sure about custom exception, I think generic like LogicException would be enough.