wwUtils::SafeCommand

Evaluates a single FoxPro command dynamically and wraps it into a TRY/CATCH block. Uses a macro (&) operation to execute the command so anything you can do with & operation is valid with the exception of LOCAL and THIS scoped variables.

o.SafeCommand(lcVfpCommand,lcErrorDisplay)

Parameters

lcVfpCommand
A Visual FoxPro Expression or Command including assignments. Macro executed (&)

lcErrorDisplay
Determines what gets returned on an error. Default is a blank string ("").
ERRORMESSAGE returns the exception message
EXPRESSION returns the expression

Remarks

You cannot pass expressions that contain local variables or the THIS pointer since they will not be in scope in the executing wrapper function.


See also:

Class wwUtils

© West Wind Technologies, 2023 • Updated: 09/30/09
Comment or report problem with topic