Clipper 5.3b error in RECOVER USING ... 
Author Message
 Clipper 5.3b error in RECOVER USING ...

Try this:

// Test
FUNCTION Main()
LOCAL oOldError := ERRORBLOCK({|oError| MyError(oError)})

BEGIN SEQUENCE
    DBCREATE("TEST", {{"NAME", "C", 10, 0}})
    USE TEST
    DBSEEK("A")     // Work area not indexed

RECOVER USING oError
    ? VALTYPE(oError)     // Logical ??????

END SEQUENCE

ERRORBLOCK(oOldError)

// MyError
PROCEDURE MyError(oError)

BREAK(oError)
// EOF

/*  Claudio Gaspar Martins
    Biro Processamento de Dados Ltda
    Novo Hamburgo - RS - Brasil



Sun, 27 Feb 2000 03:00:00 GMT  
 Clipper 5.3b error in RECOVER USING ...

On 10 Sep 1997 04:09:31 GMT, "Claudio Gaspar Martins"

Quote:
>Try this:

>// Test
>FUNCTION Main()
>LOCAL oOldError := ERRORBLOCK({|oError| MyError(oError)})

>BEGIN SEQUENCE
>    DBCREATE("TEST", {{"NAME", "C", 10, 0}})
>    USE TEST
>    DBSEEK("A")     // Work area not indexed

>RECOVER USING oError
>    ? VALTYPE(oError)     // Logical ??????

**  If this is not a typing error, oError is not visible at this point
in the function as it is a block variable, local to the error
codeblock you created using ErrorBlock().  If you compile with the
"/es2" switch, there is an error from oError (and the function needs a
return statement).

For ValType( oError ) to return a logic, looks like a bug?  With the
"/es2" switch, 5.2e also generates an error from the DBSEEK() line
referring to oError???

Quote:
>END SEQUENCE

>ERRORBLOCK(oOldError)

>// MyError
>PROCEDURE MyError(oError)

>BREAK(oError)
>// EOF

>/*  Claudio Gaspar Martins
>    Biro Processamento de Dados Ltda
>    Novo Hamburgo - RS - Brasil


Maybe someone from CA is watching and can offer advice?  I use RECOVER
but without the "USING".

Don

Don Andersen



Sun, 27 Feb 2000 03:00:00 GMT  
 Clipper 5.3b error in RECOVER USING ...

On 10 Sep 1997 04:09:31 GMT, "Claudio Gaspar Martins"

Here's a fix:
// Test
FUNCTION Main()
   LOCAL oFix
   LOCAL oOldError := ;
      ERRORBLOCK({|oError| oFix := oError, ;
      MyError(oError)})
   CLS
   BEGIN SEQUENCE
      DBCREATE("TEST", {{"NAME", "C", 10, 0}})
      USE TEST
      DBSEEK("A")       // Work area not indexed

   RECOVER USING oError
       ? VALTYPE(oFix)   // Object
   END SEQUENCE
   USE
   ERRORBLOCK(oOldError)

RETURN

// MyError
PROCEDURE MyError(oError)
   BREAK(oError)
RETURN
// EOF

Quote:
>Try this:

>// Test
>FUNCTION Main()
>LOCAL oOldError := ERRORBLOCK({|oError| MyError(oError)})

>BEGIN SEQUENCE
>    DBCREATE("TEST", {{"NAME", "C", 10, 0}})
>    USE TEST
>    DBSEEK("A")     // Work area not indexed

>RECOVER USING oError
>    ? VALTYPE(oError)     // Logical ??????

>END SEQUENCE

>ERRORBLOCK(oOldError)

>// MyError
>PROCEDURE MyError(oError)

>BREAK(oError)
>// EOF

>/*  Claudio Gaspar Martins
>    Biro Processamento de Dados Ltda
>    Novo Hamburgo - RS - Brasil




Sun, 27 Feb 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Clipper...Clipper...Clipper - 5.3b Patch

2. Clipper 5.3b (german) using 100% CPU at inkey(0)

3. msetcurdor() with protected mode error Clipper 5.3b/Blinker 7.0

4. Problems using Clipper 5.3b + Blinker 5.1

5. Error/11: _VGrab (Clipper 5.3b,DBFCDX)

6. clipper 5.3a update to 5.3b ?errors?

7. DOS Clipper 5.2e/5.3b error: Runtime 5302 Conventional memory exhausted

8. Using Foxplus indexes with clipper 5.3b

9. Clipper 5.01 and Clipper 5.3b NTX compatibility

10. Clipper 5.2e --> Clipper 5.3b

11. Clipper 5.2e + SIXCDX or Clipper 5.3b with CDX

12. Erratic internal error 1210 in clipper 5.2e app using DBFCDX - Error (0/1)

 

 
Powered by phpBB® Forum Software