new constructor for eqauality constraints with error message