Page 1 of 1

error dialog

Posted: Mon Oct 28, 2019 3:09 pm
by damianodec
Hi,
I have an .exe that runs in schedulate time.
I'd like that this program does not show a dialog when error occour but I'd like that it writes an myError.log and stop run.

any help?

Re: error dialog

Posted: Mon Oct 28, 2019 6:38 pm
by Enrico Maria Giordano

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL nVar, oErr

    ERRORBLOCK( { | oErr | Break( oErr ) } )

    BEGIN SEQUENCE
        nVar *= 2
        ? nVar
    RECOVER USING oErr
        ? "Do what you want"
        ? oErr:Description
    END SEQUENCE

    RETURN NIL
EMG