xHarbour 0.99.4 + FWH 2.5 error division by 0

Post Reply
User avatar
Kleyber
Posts: 581
Joined: Tue Oct 11, 2005 11:28 am
Location: São Luiz, Brasil

xHarbour 0.99.4 + FWH 2.5 error division by 0

Post by Kleyber »

Hi,

I'm having problems with this in my apps. When I have 123 / 0, for example, this gives me an recursive error "too many recursive error handler calls" and the program quits without passing by my errorsys. Has anyone using the same versions as me? Have you got this problem? If so, which was the solution?

Regards,

Kleyber Derick

P.S.: I cannot change to a newer xHB version because I have third-party lib which I don't have its sources.
User avatar
Roger Seiler
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA
Contact:

Post by Roger Seiler »

Make sure that your version of Errsysw.prg has the following code located immediately after declaration of locals in function ErrorDialog( e )...

// by default, division by zero yields zero
if ( e:genCode == EG_ZERODIV )
return (0)
end

If this code is located further down in the code of this function (as it was in earlier versions of errsysw.prg), you can get the recursive error.

- Roger
User avatar
Kleyber
Posts: 581
Joined: Tue Oct 11, 2005 11:28 am
Location: São Luiz, Brasil

Post by Kleyber »

Thanks Roger,

I already done this in my errsysw.prg, but the message is still showing. The most interesting thing is when I use pure xHarbour, the result is zero, without any problem. I am now reviewing all my thid-party lib to see if there is some errorsys function declared in other places.

Regards,

Kleyber Derick
User avatar
Kleyber
Posts: 581
Joined: Tue Oct 11, 2005 11:28 am
Location: São Luiz, Brasil

Post by Kleyber »

Well, I've reviewd all my third-party lib and I didn't find anything or any other errorsys function... :( If someone can give an idea in how to solve it, I'll be very thankful.

Regards,

Kleyber Derick
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Kleyber,

With FWH 2.7 and Harbour/xharbour this sample works ok:

Code: Select all

function Main()

   MsgInfo( 123 / 0 )
            
return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply