Suppose I have a form that lets a user register for a site, and there are three EXPECTED errors they can get:
If I throw exceptions for these, and then handle them gracefully in a try/catch, is that considered good practice, or abuse of exceptions?
I feel like there's a difference between using exceptions to display known/expected messages to end-users, and using exceptions to alert developers as to issues with the code when developing something.
It's very tempting to use exceptions and try/catch blocks as an easy solution to displaying user-facing messages (even success confirmations!). Where is the use/abuse line concerning exception messages (if any)?
Success confirmations are not exceptions, that's actually the essence of the word exception
. i.e.: an exception occurs because the functionality does not end with success.
This is definitely not abusive to raise an exception for any of the situations you mention. I personnally would even say that it is a good practice, since it enforces use cases encapsulation at the highest level (try catch at service interface or front-end level)