Hi, all.
I'm new to iBatis, and wonder how to get custom data exception in the
web application.
Say, I have a database table Users (id, username, password), the username
is UNIQUE.
While insert new user data with a duplicated username , a data exception
will be thrown from jdbc indicate constraint conflict on some datafileds.
But I personally think throw a custom exception like
UsernameExistedException will be a better way for other layer to log or
notify user.
How can I do it?
Ps : I use Tapestry 5 + spring 2.5M + iBatis 2 + postgresql 8.3 beta +
tomcat 6.0.14 for evaluation.
Thanks!
gogoyuan [_at_] gmail.com