replaced confess with throw_exception
Wrote tests for TypeConstraintIsAlreadyCreated
Wrote exception class for TypeConstraintIsAlreadyCreated