Code Sample: Building the Error String and Mapping It to the Message

When you create your business service, you write code that builds the error string and maps it to the message. This business service code sample illustrates how to build the error string and map it to the message list:

 //Create error list to concatenate errors for return
        StringBuffer errorList = new StringBuffer();             

       //add message to list
                    if (errorList != null) {
                        errorList.append(DELIMITER + msgContext + ":" + 
                                         errorsVO.getF34A50_OWERROR());
                    }

         if (!errorList.toString().equals("")) {
            internalVO.setSzErrors(errorList.toString().substring(1));
        }