Added catchin of constraint violation exception