Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #7833
| 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 | 2015-03-06 08:49 +0100 |
| Message-ID | <clt4giFnqejU1@mid.individual.net> (permalink) |
| References | <sbphfa9sf202jf8hnpm33nbrsu24ijqds0@4ax.com> |
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
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