VL Web runtime script error handling

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Kazunori Kasahara
Posts: 20
Joined: Wed May 25, 2016 5:26 pm

VL Web runtime script error handling

Post by Kazunori Kasahara »

Hi,

The following error occurs when the SET_REF command assigns a component reference to a variable that has been defined with a dynamic reference in the DEFINE_COM statement without network connection.
Our customer would not like to show the following error to end users.
Is there any way to handle VL Web runtime script error?

LANSA Runtime Error:
Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://192.168.1.3:3080/x42pgmlib/lansa ... r-jpn.json'.
(Browsers other than Chrome shows NetworkError.)

Thank you in advance.
Best Regards,
Kazunori Kasahara
MarkDale
Posts: 116
Joined: Wed Dec 02, 2015 10:06 am

Re: VL Web runtime script error handling

Post by MarkDale »

There is a parameter on SET_REF for Com_Error.

If you used SET_REF ... COM_ERROR(*IGNORE)
or
SET_REF ... COM_ERROR(*SET_NULL)

would that help solve the problem?

Then you could test whether the component was null before using it.
Kazunori Kasahara
Posts: 20
Joined: Wed May 25, 2016 5:26 pm

Re: VL Web runtime script error handling

Post by Kazunori Kasahara »

Thank you very much for your reply.
I tried, but COM_ERROR(*IGNORE) and COM_ERROR(*SET_NULL) couldn't stop that script error.
We will consider to check network connection before assigning a component reference.
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: VL Web runtime script error handling

Post by MarkD »

This sounds like a potential defect.

COM_ERROR(*SET_NULL) should trap everything.

Could you please report this, which some sample code, via your local LANSA support team?
Kazunori Kasahara
Posts: 20
Joined: Wed May 25, 2016 5:26 pm

Re: VL Web runtime script error handling

Post by Kazunori Kasahara »

I will report this to LANSA Support.
Thank you.
Post Reply