| Author | Topic: Sample DosError 2 ??? |
---|
| AUGE_OHR | Sample DosError 2 ???
on Sat, 26 Jan 2008 21:32:31 +0100hi,
why does Help Sample not work ?
*** snip ***
PROCEDURE Main
LOCAL oError
LOCAL bErrorBlock := ErrorBlock( {|e| Break(e) } )
BEGIN SEQUENCE
DosError(55) Aktuellen Fehlercode bestimmen
? DosError() Ergebnis: 55
USE abcdefgh NEW Laufzeitfehler erzeugen
RECOVER USING oError
? DosError() Ergebnis: 2
Bedeutet: Datei nicht gefunden
IF DosError() == 2
? "Die Datei", oError:Filename, "existiert nicht!"
ENDIF
END SEQUENCE
ErrorBlock(bErrorBlock)
RETURN
*** eof ***
greetings by OHR
Jimmy |
| Hannes Ziegler | Re: Sample DosError 2 ???
on Sun, 27 Jan 2008 02:13:38 +0100Jimmy,
"USE abcdefgh NEW" produces a runtime error which overwrites the previous
DosError(55) setting.
HTH,
--
Hannes
"AUGE_OHR" <AUGE_OHR*AT*WEB.DE> schrieb im Newsbeitrag
news:3b4b1ac3$6e5f0f70$1c4@news.alaska-software.com...
> hi,
>
> why does Help Sample not work ?
> *** snip ***
> PROCEDURE Main
> LOCAL oError
> LOCAL bErrorBlock := ErrorBlock( {|e| Break(e) } )
>
> BEGIN SEQUENCE
> DosError(55) Aktuellen Fehlercode bestimmen
> ? DosError() Ergebnis: 55
>
> USE abcdefgh NEW Laufzeitfehler erzeugen
>
> RECOVER USING oError
> ? DosError() Ergebnis: 2
> Bedeutet: Datei nicht gefunden
> IF DosError() == 2
> ? "Die Datei", oError:Filename, "existiert nicht!"
> ENDIF
> END SEQUENCE
> ErrorBlock(bErrorBlock)
>
> RETURN
> *** eof ***
> greetings by OHR
> Jimmy
> |
| AUGE_OHR | Re: Sample DosError 2 ???
on Sun, 27 Jan 2008 07:02:21 +0100hi,
> "USE abcdefgh NEW" produces a runtime error
> which overwrites the previous DosError(55) setting.
ok ... but i got 0 NOT 2 ?
*** snip ***
USE abcdefgh NEW Laufzeitfehler erzeugen
RECOVER USING oError
? DosError() -> 0 ???
*** eof ***
greetings by OHR
Jimmy |
| Rodd Graham | Re: Sample DosError 2 ???
on Sun, 27 Jan 2008 06:36:49 +0000Hello AUGE_OHR" AUGE_OHR*AT*WEB.DE,
>> "USE abcdefgh NEW" produces a runtime error
>> which overwrites the previous DosError(55) setting.
> ok ... but i got 0 NOT 2 ?
> *** snip ***
> USE abcdefgh NEW Laufzeitfehler erzeugen
> RECOVER USING oError
> ? DosError() -> 0 ???
> *** eof ***
Maybe it wasn't a Dos Error? What is in the error object?
What is the advantage of using DosError() vs examining the error object?
Regards,
Rodd Graham, Consultant
Graham Automation Systems, LLC |
| AUGE_OHR | Re: Sample DosError 2 ???
on Sun, 27 Jan 2008 18:29:09 +0100hi,
> What is the advantage of using DosError() vs examining the error object?
it is Alaska Help file Sample for DosError()
greetings by OHR
Jimmy |
| Rodd Graham | Re: Sample DosError 2 ???
on Sun, 27 Jan 2008 21:38:59 +0000Hello Hannes,
> "USE abcdefgh NEW" produces a runtime error which overwrites the
> previous DosError(55) setting.
If runtime errors overwrite DosError() and low level files functions are
reported by FError(), is there any practical use for DosError? If so, a
simple example?
Regards,
Rodd Graham, Consultant
Graham Automation Systems, LLC |
| Hannes Ziegler | Re: Sample DosError 2 ???
on Mon, 28 Jan 2008 14:08:25 +0100Rodd,
> If runtime errors overwrite DosError() and low level files functions are
> reported by FError(), is there any practical use for DosError? If so, a
> simple example?
I believe DosError() is Clipper 87 legacy. I hardly remember if I ever used
DosError().
Regards,
--
Hannes |