Skip to Content
0

How to throw exception from script in SAP HCI.

Dec 21, 2016 at 05:59 AM

306

avatar image
Former Member

script.txtHi Experts,

I have a script in an integration flow, i am trying to throw an exception from script if condition is not met. But it is not working. Kindly help me in completing this.

Regards,

Vijay

script.txt (1.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Sriprasad Shivaram Bhat Dec 21, 2016 at 10:27 AM
0

Hello Vijay ,

Could you please elaborate more on the issue you are facing.?

Do not see any issue with your script,except there is missing statement "return message;" in last line.

I am able to see custom exception raised from Integration Process.

Regards,

Sriprasad Shivaram Bhat.

Share
10 |10000 characters needed characters left characters exceeded
Sriprasad Shivaram Bhat Dec 21, 2016 at 11:43 AM
0

Hello Vijay,

Try with the attached code.

customexception.txt

Sriprasad Shivaram Bhat


Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Dec 21, 2016 at 11:19 AM
0

Hhi Sriprasad,

I have tried the same but it is failing with the below error message. Kindly help me in solving it.

javax.script.ScriptException: java.lang.Exception: java.lang.Exception: not valid@ line 25 in script.groovy, cause: java.lang.Exception: not valid

Regards,

Vijay

Share
10 |10000 characters needed characters left characters exceeded
Sriprasad Shivaram Bhat Dec 21, 2016 at 07:13 PM
0

Hello Vijay,

Can you please share your complete or snippet of Groovy script you have written.One which you have shared is not complete.

Regards,

Sriprasad Shivaram Bhat

Share
10 |10000 characters needed characters left characters exceeded