Problems using error object

This forum is for eXpress++ general support.
Message
Author
Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Problems using error object

#11 Post by Cliff Wiernik »

Unfortunately procname(2), procline(2) point to the calling function 2 levels up.

bExtract:= {|a,b,o,x| S_Extract(Getlist,oV)} // Extract configured data

Which is the code block activated by the DCPUSHUBUTTON.

User avatar
Auge_Ohr
Posts: 1406
Joined: Wed Feb 24, 2010 3:44 pm

Re: Problems using error object

#12 Post by Auge_Ohr »

Cliff Wiernik wrote:

Code: Select all

  BEGIN SEQUENCE
  
  DO WHILE !EOF()
    SOME CODE
    SKIP
  ENDDO
are you using Alaska DBE or ADS or other ?
what does it show when NOT using your own Errorblock -> Original ?
greetings by OHR
Jimmy

reganc
Posts: 257
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Problems using error object

#13 Post by reganc »

I have error handling where I have to call a function, eg. my_error(), instead of puttiing just 'break(oError)' into the codeblock.

The function reads the callstack text and puts it into the oError:cargo variable and then does the 'break(oError)' call. That way the callstack is being read in the thread the error occurred in instead of in the error handling thread. And then the value of oError:cargo variable can be read to get the callstack text in the RECOVER..USING bit.
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Problems using error object

#14 Post by Cliff Wiernik »

Do you have a small code sample to illustrate.

Maybe Roger can provide a code sample also.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Problems using error object

#15 Post by Cliff Wiernik »

Using ADS and without the error handler, I get the normal runtime error.

Cliff Wiernik
Posts: 605
Joined: Thu Jan 28, 2010 9:11 pm
Location: Steven Point, Wisconsin USA
Contact:

Re: Problems using error object

#16 Post by Cliff Wiernik »

Thanks, all for the help, especially Regan.

When I created a function and posted procname(2),procline(2) to cargo, prior to the break(oError), I got the line needed. Now I can make my dumb custom error handling better.

Cliff

Post Reply