NetTalk Central

Author Topic: NT12 and .trace problem  (Read 1360 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1846
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
NT12 and .trace problem
« on: July 30, 2021, 12:38:10 PM »
Hi,
Using .Trace in a LOOP END
It changes the error() and errorcode() values

Code: [Select]
    LOOP
        p_web.trace('11-next')
        next(InMemoryGenerica)
        p_web.trace(errorcode()&' corto') !<<<<<<<<<<<<<<<<<<<<<<<<
        if errorcode()>0
            p_web.trace(errorcode()&' corto')
            break
        END
        p_web.trace(errorcode()&' '&IMG:c1)
        if IMG:C1 <> p_web.sessionid then break END
        p_web.trace('sumo: '&IMG:c1&' '&IMG:c4)
        p_web.ssv('CantidadCarrito',p_web.gsv('CantidadCarrito')+IMG:C4)
    END
-----------
Regards
Alberto

Jane

  • Sr. Member
  • ****
  • Posts: 349
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: NT12 and .trace problem
« Reply #1 on: July 30, 2021, 07:30:58 PM »
From the Clarion help:

The ERROR procedure returns a string containing a description of any error that was posted. If no error was posted, ERROR returns an empty string. You should interrogate ERROR immediately after the statement which you suspect may post an error because processing any other statement which could post an error will clear the internal errorcode.