public Message causesMyException(Message message) throws ActionProcessingException {
System.out.println("About to cause an exception");
try {
// some logic that bubbles up MyBusinessException
throw new MyBusinessException("Business Logic Violation");
} catch (MyBusinessException mbe) {
System.out.println(mbe.getMessage());
throw new ActionProcessingException(mbe);
}
// return message; // unreachable due to the way this demo code is setup