The Desktop expects a provider to only throw ProviderException or a subclass of the ProviderException. For correct operation, a provider must only throw expected exception type. That is:
Minor exceptions can be managed internally, for example, log a debug message.
Serious exceptions can be rethrown as an expected exception type.
Exceptions from providers are logged in PortalServer-DataDir/portals/portal-ID/logs/portal-instance/portal.0.0.log file. Note that this file is created only if there is an error.
The ProviderException is a generic superclass for all provider related exceptions.
The AsciiFormInputExpectedException will be thrown from Provider.processEdit() method when something other than ASCII only encoded form input is sent to it.
The InvalidEditFormDataException is thrown from the Provider.processEdit() method when there is an error in the data input by the user. If thrown, the Desktop will send back the same Edit page, and will attach the exception’s message as a parameter to the URL. For example, if the exception is:
throw new InvalidEditFormDataException("Error Error");
the Desktop will redirect back to the same Edit page, adding the error message to the URL error parameter:
error=Error Error
The edit page wrapper then looks for the error parameter in the URL and if present, displays the message (or the value of the error parameter) at the top of the page in red.
The UnknownEditTypeException may be thrown from Provider.getEditType() method if an unknown or undefined edit type is encountered.