IBM Support

Methods for Throwing custom exception to the UI

Troubleshooting


Problem

Methods for Throwing custom exception to the UI

Symptom

Methods for throwing custom exception to the UI.

Cause

Resolving The Problem

Whenever a custom exception (YFSException / class extending YFSException) is thrown from custom code, the following methods need to be used.

Solution: The following methods are now exposed in the YFSException class:

public String getErrorCode()
public String getErrorDescrption()
public void setErrorCode(String sErrorCode)
public void setErrorDescription(String sErrorDescription)

When using these methods, developers of the custom code must set the appropriate error code as well as the error description (before throwing the exception). Whenever an exception is thrown on the user interface or whenever an exception enters the reprocessible queue, the set description displays on the console exception window (in case of exception out of a synchronous service) OR on the Exception console (in case of reprocessible exceptions coming out of an asynchronous service).

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Historical Number

PRI49588

Product Synonym

[<p><b>]Fact[</b><p>];

Document Information

Modified date:
16 June 2018

UID

swg21529689