1. Jacob Osborne
  2. PowerBuilder
  3. Thursday, 8 July 2021 17:40 PM UTC

I'm attempting to use the LoadXml() method of an MSXML Dom Document in an azure environment and it simply isn't working. When running on non-azure environments it works fine.
There is no dev environment for our azure server yet so I can't view the error which may be happening.

The following error is triggering: 

lnvo_log.writeerror("An error has occurred while parsing the " + ls_type + " response. " + lole_xml.parseError.srcText, this, "wf_open_iexplore():20")

René Ullrich Accepted Answer Pending Moderation
  1. Friday, 9 July 2021 04:42 AM UTC
  2. PowerBuilder
  3. # 1

So you can get error information if Load function fails (returns FALSE):

 

ls_errormsg = "URL: " + aole_error.url + "~r~n~r~n"
ls_errormsg += "ErrorCode: " + string (aole_error.errorcode) + "~r~n"
ls_errormsg += "Reason: " + aole_error.reason + "~r~n~r~n"
ls_errormsg += "Position: " + string (aole_error.filepos) + &
" Row: " + string (aole_error.line) + &
" Col: " + string (aole_error.linepos) + "~r~n"
ls_errormsg += "Src: " + aole_error.srcText

 

aole_error is in this case a parameter (OLEObject) for an error function. Pass lole_xml.parseError as parameter.

 

HTH,

René

Comment
  1. Jacob Osborne
  2. Friday, 9 July 2021 13:25 PM UTC
I'm sorry, I don't understand. Could you explain in more detail

what aole_error is supposed to be and how it works?
  1. Helpful
  1. René Ullrich
  2. Monday, 19 July 2021 05:25 AM UTC
I have a function of_showxmlerror(oleobject aole_error) with this code (an a litte more).

To show the error add this to your code:



IF NOT lb_status THEN of_showoleerror (lole_xml.parseError)
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 8 July 2021 17:48 PM UTC
  2. PowerBuilder
  3. # 2

Hi Jacob;

  One thing that "might" work in order to get more relevant information on the error "An error has occurred while parsing ..." that I have used in the past, is to wrap your code block in a TRY..CATCH statement. The "Exception" object after an OLE Error can often contain more detailed information in order to determine the more exact cause of what the OLE Sever APP is complaining about.

HTH

Regards ... Chris

Comment
  1. René Ullrich
  2. Friday, 9 July 2021 04:39 AM UTC
Works only if it throws an exception. In this case catch OLERuntimeError exception.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.