Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #3003
| From | "Willie Moore" <williem@wmconsulting.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: ErrorBlock/Begin Sequence does not work |
| Date | 2012-02-21 07:28 -0600 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ji066a$5bu$1@speranza.aioe.org> (permalink) |
| References | <68bbdb31-5b52-413b-9fd2-0f422fa40b81@eb6g2000vbb.googlegroups.com> |
Gregory,
Where you set a local handler, you need to set it up so it will break and
call your own code located in the recover using. The only place I have seen
the errorblock as you have done it is in the mcperrorhandler and you will
notice with that they did not follow it up with a recover using. Once you
are in your local recover using, you can call myHandler(uxError) and it will
execute. I have included a small error handling snippet that should help.
Regards,
Willie
LOCAL uxError AS Usual
LOCAL cb AS CodeBlock
cb := ErrorBlock( {|e| _Break(e) } )
Begin Sequence
// code goes here
RECOVER USING uxError
InfoBox{,"Errorhandler","mój"}:Show(SHOWCENTERED)
END SEQUENCE
ErrorBlock( cb )
Regards,
Willie
Vulcan VIP
"Grzegorz Ramotowski" wrote in message
news:68bbdb31-5b52-413b-9fd2-0f422fa40b81@eb6g2000vbb.googlegroups.com...
Hello Friends,
I have problems opening databases and tried to use BEGIN SEQUENCE but
my code (below) does not work :( - even I wrote an errorhandler it
never gets called and a runtime error ('Workarea not in use, File does
not contain table' (although has and 'Igore' button works fine)
appears. Why?
bLastHandler := ErrorBlock({|oError| MyHandler(oError)})
iLoop:=0
DO WHILE TRUE
BEGIN SEQUENCE
dbTmp:=CreateInstance(AsSymbol(sDataBaseName)) // here
happens an error
RECOVER USING oerr
IF iLoop<3
iLoop++
LOOP
ENDIF
END
EXIT
ENDDO
ErrorBlock(bLastHandler)
and
FUNCTION MyHandler(oError)
// InfoBox{,"Errorhandler","mój"}:Show(SHOWCENTERED)
BREAK oError
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ErrorBlock/Begin Sequence does not work Grzegorz Ramotowski <ramotny@tlen.pl> - 2012-02-21 01:32 -0800
Re: ErrorBlock/Begin Sequence does not work "Marc Verkade [Marti]" <marcatm@rti.nl> - 2012-02-21 11:12 +0100
Re: ErrorBlock/Begin Sequence does not work "Willie Moore" <williem@wmconsulting.com> - 2012-02-21 07:28 -0600
Re: ErrorBlock/Begin Sequence does not work Grzegorz Ramotowski <ramotny@tlen.pl> - 2012-02-21 08:06 -0800
Re: ErrorBlock/Begin Sequence does not work "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2012-02-23 11:14 +1100
Re: ErrorBlock/Begin Sequence does not work Mathias <mathias.hakansson@consultec.se> - 2012-02-22 23:43 -0800
csiph-web