I have unique index on two fields (COL1,CoL2)
I wanna write it to DB, but on failure I don't want to throw any user error. Just that one that I want to show. I made
try {
$branch->write();
}
catch(ValidationException $e) {
$bad++
show_error_with_bad_results($bad);
}
but It doesn't seem to catch it. I t throws user error instead. How could I make it work.