raise error if multiple constraints are met