IBM Support

Handling exception in custom code for exceptions raised from OOTB code

Question & Answer


Question

How do you handle exception in custom code for exceptions raised from OOTB code in IBM Sterling Order Management?

Cause

You want to modify the OOTB error messages thrown in product in some error scenario.

Answer

Custom code can be invoked from custom services or from User Exits and this custom code may invoke OOTB APIs. In a scenario when the error code returned by these APIs need to be modified as per custom requirement, you tend to catch this exception in the custom code and return a modified error message. If the exception object is not thrown back from custom code, then the transaction will not roll back. Hence a strange behavior may be observed.

The better way to achieve this requirement is as follows:

  • Utilize the custom error code, if requirement can be achieved with those custom error codes.

  • Do the exception handling outside of Sterling Framework, from where Sterling Flow is getting invoked.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Documentation","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF014","label":"iOS"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.0;9.1;9.2;9.2.1;9.3;9.4;9.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
10 May 2022

UID

swg21986202