cancel
Showing results for 
Search instead for 
Did you mean: 

Is exception handling available in ABSL scripting?

Vignesh_Dh
Participant
901

Dear Experts,

As most of the popular programming languages like javascript,C#,Java etc provide the exception handling with try{}catch{} block in code, does ABSL have similar feature?

Exception handling can be used in lot many scenarios but my sample case can be the one below:

When we can do REST API calls in ABSL (may be MDR kind of scenario), we should have some feature for exception handling so some REST API calls can be retried when server errors are returned due to some locking objects or server busy kind of scenario, instead of just abruptly terminating the process when we get HTTP 500 response codes.

Regards,

Vignesh

Accepted Solutions (1)

Accepted Solutions (1)

Hi Vignesh,

I understand your concern here. There is no concept like exceptions that coulde be handled application aborts. You can use raises and raise keywords along with custom text + Create keyword to capture the errors.

Look at the below blog -

https://blogs.sap.com/2016/05/15/how-to-troubleshoot-and-handle-exceptions-in-c4c/#jive_content_id_3...

Regards

Chandra

Vignesh_Dh
Participant
0 Kudos

Hi Chandra,

I know about the custom message raising option.

With this approach we can raise errors only when we anticipate and find all possible code scenarios which may run into errors. try{}catch{} exception handling works differently on other languages where a developer can write code in try{} block without worrying about all the scenarios and the catch{} block will take control for any possible errors in a catch block.

then we are left with this only option is initial checks and 'raise' keyword in ABSL.

Thanks.

Answers (1)

Answers (1)

former_member183363
Active Contributor

The short answer is no. The longer answer is no, but you can use IsSet(), IsInitial() and 'if Count() > 0)' to handle NULL data references.

Vignesh_Dh
Participant
0 Kudos

Thanks for your feedback Lewis.