Managing application errors and system exceptions
The Management Center web application uses application errors and system exceptions to provide error information.
Application errors
When you invoke a service, the service request might not be processed because of information that is specified in the request BOD. If the request cannot be processed, the response BOD contains error information in the change status element within the response verb. Management Center assumes that application errors occurred when the response BOD is populated with change status information and the change status element contains the error information.Error information that is sent from response messages is managed by the exception
framework in the Management Center programming model. When the input to the client methods
cannot be converted into valid input to the request BOD, this exception framework includes mediation
validation logic. Regardless of whether the exception is due to invalid input that cannot be
mediated or an error response from the server, the exception is represented as an
AbstractBusinessObjectDocumentException
. This exception framework includes the
concept of ClientErrors
, which is a list of errors that is associated with the
request. Since Management Center might have multiple validation errors or the server might
return multiple validation errors, Management Center needs to manage only the Management Center objects.
<errors>
<validationError>Invalid price.</validationError>
<validationError propertyName=name>Name must be alphanumeric.</validationError>
</errors>
The Management Center web application mediation between Management Center and WebSphere Commerce services includes the mediation of URL requests and nouns to Management Center objects. This mediation must also manage validation errors that are returned by the server. When validation errors are returned by the response BOD, the Management Center web application mediates these errors into the format that is expected by Management Center. This mediation includes mapping a specific error message to a client object property. It might also include changing the message to make it more meaningful to the Management Center user.
System exceptions
System exceptions are exceptions that occur because of reasons outside the control of the business user and cannot be resolved by the user. The user interface can display generic error messages that provides details on the problem. The exception text is also logged in the Management Center web application for administrators to review.
<errors>
<exception>An unexpected problem occurred while processing your request. Please contact you administration for further assistance.</exception>
</errors>
Not all system exceptions return the same message. You can customize certain exceptions to return custom messages instead of the generic message. These custom messages can provide more meaningful information to administrators.