We are creating an application for a client's website. The website will make a function call to our application to generate XML data, which we will return as a String. If something goes wrong during the course of our processing, how should we report this error? Should we throw an Exception for the client's website to catch, or should we return a String containing the error code (instead of the XML data)? Which makes sense and/or is the better practice?
Thank you in advance for helping us out!