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: 11
Joined: Wed May 25, 2016 5:26 pm

VL Web runtime script error handling

Post by Kazunori Kasahara » Tue Oct 09, 2018 4:37 pm

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: 76
Joined: Wed Dec 02, 2015 10:06 am

Re: VL Web runtime script error handling

Post by MarkDale » Wed Oct 10, 2018 10:00 am

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: 11
Joined: Wed May 25, 2016 5:26 pm

Re: VL Web runtime script error handling

Post by Kazunori Kasahara » Thu Oct 11, 2018 6:57 pm

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: 459
Joined: Wed Dec 02, 2015 9:56 am

Re: VL Web runtime script error handling

Post by MarkD » Tue Oct 16, 2018 9:23 am

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: 11
Joined: Wed May 25, 2016 5:26 pm

Re: VL Web runtime script error handling

Post by Kazunori Kasahara » Wed Oct 17, 2018 10:06 am

I will report this to LANSA Support.
Thank you.

Post Reply