Alaska Software Inc. - Sample DosError 2 ???
Username: Password:
AuthorTopic: Sample DosError 2 ???
AUGE_OHRSample DosError 2 ???
on Sat, 26 Jan 2008 21:32:31 +0100
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
Hannes ZieglerRe: Sample DosError 2 ???
on Sun, 27 Jan 2008 02:13:38 +0100
Jimmy,

"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_OHRRe: Sample DosError 2 ???
on Sun, 27 Jan 2008 07:02:21 +0100
hi,

> "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 +0000
Hello 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_OHRRe: Sample DosError 2 ???
on Sun, 27 Jan 2008 18:29:09 +0100
hi,

> 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 +0000
Hello 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 ZieglerRe: Sample DosError 2 ???
on Mon, 28 Jan 2008 14:08:25 +0100
Rodd,

> 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