Hi all,
Has anyone changed the errorsys in order to quit the program only if we pulse the button QUIT? My idea is if we pulse other button, the program continues normally without quit. Is it possible? If so, how can I do it in my errorsys?
Best Regards,
Changing Errorsys
Changing Errorsys
Kleyber Derick
FWH / xHb / xDevStudio / SQLLIB
FWH / xHb / xDevStudio / SQLLIB
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Changing Errorsys
It's only possible for recoverable errors. You can BREAK if you want let the main program to handle the error, return .T. to retry the operation or return .F. to ignore the error.
EMG
EMG
Hi Enrico,
Thanks (as always) for your answer. I was looking at a program made in Delphi where all the errors are showed, but the user can ignore them and come back to the program. Which cases are non recoverable errors? Do you have an example to show it?
best regards,
Thanks (as always) for your answer. I was looking at a program made in Delphi where all the errors are showed, but the user can ignore them and come back to the program. Which cases are non recoverable errors? Do you have an example to show it?
best regards,
Kleyber Derick
FWH / xHb / xDevStudio / SQLLIB
FWH / xHb / xDevStudio / SQLLIB
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Unrecoverable errors are the ones with
This is a sample of error trapping:
EMG
Code: Select all
oErr:Severity = ES_CATASTROPHIC //3
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL nVar, oErr
ERRORBLOCK( { | oErr | Break( oErr ) } )
BEGIN SEQUENCE
nVar *= 2
RECOVER USING oErr
? "oErr:Description", oErr:Description
? "oErr:CanDefault", oErr:CanDefault
? "oErr:CanRetry", oErr:CanRetry
? "oErr:CanSubstitute", oErr:CanSubstitute
? "oErr:Severity", oErr:Severity
END SEQUENCE
RETURN NIL