Instead of the error message
"The statement has been terminated. Violation of PRIMARY KEY....."
Is there anyway to trap different types of error (...primary key, length too long, unique constraint) and provide a nicer error message to the user.
How do you guys do it ? can share ?