Say that I've got a web application that can store Persons in a database. Every Person must have a unique email address (or username or whatever). If a user attempts to add a Person with an email address that already exists, the form should be returned with an error message (like it would during a typical validation failure).
How is this kind error most typically bubbled up from the service layer to the controller and then to the view? Should the service method throw an exception for the controller to catch, or return a value or some kind of result object?
If I eventually want to use my service layer to generate a web service, does this change how I might proceed?
Any suggestions or links to best practices / sample applications would be appreciated.