Say my model does some validation of business rules. What's the best way
to communicate those errors to the controller, and then (in the case of
struts) translate those into ActionError's? It seems that if I want to
communicate specific errors, creating Exception's for each case might be
Nick Wesselman wrote:
create a custom Exception with a set of
error codes and messages?
This is what we've done in the past. We'd assign a set of error codes
in the ApplicationResources file. and throw an exception like this:
throw new MyException(12345, ...);
And catch it like this:
try {
2 matches
Mail list logo