xHarbour 0.99.4 + FWH 2.5 error division by 0

xHarbour 0.99.4 + FWH 2.5 error division by 0

Postby Kleyber » Sat Feb 18, 2006 7:47 pm

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
Kleyber
 
Posts: 581
Joined: Tue Oct 11, 2005 11:28 am
Location: São Luiz, Brasil

Postby Roger Seiler » Sat Feb 18, 2006 10:11 pm

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
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Postby Kleyber » Sat Feb 18, 2006 10:44 pm

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

Postby Kleyber » Sun Feb 19, 2006 12:19 am

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
Kleyber
 
Posts: 581
Joined: Tue Oct 11, 2005 11:28 am
Location: São Luiz, Brasil

Postby Antonio Linares » Sun Feb 19, 2006 10:07 am

Kleyber,

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

Code: Select all  Expand view
function Main()

   MsgInfo( 123 / 0 )
           
return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42075
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 87 guests