Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #7833

Re: Why doesn't the error handler catch division by 0?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From kw@e﹐s-system.dot.de
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Why doesn't the error handler catch division by 0?
Date Fri, 06 Mar 2015 08:49:38 +0100
Lines 40
Message-ID <clt4giFnqejU1@mid.individual.net> (permalink)
References <sbphfa9sf202jf8hnpm33nbrsu24ijqds0@4ax.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net tUC7T3+s5YrYaJRh1f7veAG9U1UCOylfHZL0kcoUj9oKiyP1oQ
Cancel-Lock sha1:hfUpB9slicByljRRXU3g2bDhdt8=
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
In-Reply-To <sbphfa9sf202jf8hnpm33nbrsu24ijqds0@4ax.com>
Xref csiph.com comp.lang.clipper.visual-objects:7833

Show key headers only | View raw


Hi Dick,

I don't see your problem here, everything works as expected ...

Just some questions:

bLastHandler := ErrorBlock({|oErr| MyHandler(oErr, TRUE)})
What is this line good for ? What happens if you delete it ?

How are n and n2 declared ?

Karl

Am 06.03.2015 um 00:33 schrieb D.J.W. van Kooten:
>
> The code below doesn't handle a division by 0 but gives a 'An
> unhandled exception error occured in module VO28GUI.DLL or your
> application!
>
> However, an array[0] access is handled by the RECOVER code:
>
> LOCAL cobOldErrFunc AS USUAL
> LOCAL a:={} AS ARRAY
> bLastHandler := ErrorBlock({|oErr| MyHandler(oErr, TRUE)})
> cobOldErrFunc := ErrorBlock( {|oErr|_Break(oErr)} )
> BEGIN SEQUENCE
> 	n:=0
> 	n2:=5/n	// This does not go to RECOVER
> 	n2:=a[0]	// This does go to recover
> RECOVER
> 	MessageBox(SELF:Handle(),String2Psz("Run time error
> "),String2Psz(""),MB_OK)	
> END SEQUENCE
> ErrorBlock(cobOldErrFunc)
>
>
> Why wouldn't it handle the division by zero error I was wondering?
>
> Dick
>

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Why doesn't the error handler catch division by 0? D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-03-06 00:33 +0100
  Re: Why doesn't the error handler catch division by 0? kw@e©os-system.dot.de - 2015-03-06 08:49 +0100
    Re: Why doesn't the error handler catch division by 0? D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-03-06 14:52 +0100
  Re: Why doesn't the error handler catch division by 0? Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2015-03-06 09:24 +0000
  Re: Why doesn't the error handler catch division by 0? Sherlock <sherlock@sherlock.com.au> - 2015-03-10 00:36 -0700
    Re: Why doesn't the error handler catch division by 0? D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2015-03-10 11:28 +0100

csiph-web