Domain service to (attempt) to recognize certain
exceptions, and return user-friendly messages instead.
Rather than redirecting to a general-purpose error page,
the message (corresponding to the recognized exception) is rendered
as a regular validation message.
More than one implementation of
ExceptionRecognizer can
be registered; they will all be consulted (in the order specified in
isis.properties) to determine if they recognize the exception.
The message returned by the first service recognizing the exception is
used.
The Isis framework also provides a default implementation of this
service that recognizes any
org.apache.isis.applib.RecoverableException, simply returning
the exception's
org.apache.isis.applib.RecoverableException#getMessage(). This
allows any component or domain object to throw this exception with
the knowledge that it will be handled appropriately.
Initially introduced for the Wicket viewer; check the documentation
of other viewers to determine whether they also support this service.