次の方法で共有


Debugging and Error-Handling Language

The following table lists language makes it possible for you to perform debugging and error-handling operations in Visual FoxPro programs.

Debugging Language

Use

To

* Command

Indicate the beginning of a comment line.

&& Command

Indicate the beginning of an inline comment.

CLEAR Commands

Release the specified item or items from memory.

DEBUG Command

Open the Visual FoxPro Debugger.

DEBUGOUT Command

Direct the result of one or more expressions to the Debug Output window.

SET DEVELOPMENT Command

Determine whether the Trace window is opened when an error occurs in a form that is running.

SET TALK Command

Determine whether Visual FoxPro displays command results.

SET TRBETWEEN Command

Enable or disables tracing between breakpoints in the Trace window.

WAIT Command

Display a message and pauses Visual FoxPro execution until the user presses a key or clicks the mouse.

Error Handling Language

Use

To

AERROR( ) Function

Store error information in an array.

COMRETURNERROR( ) Function

Store error information in the COM exception structure.

DEBUG Command or SET STEP Command

Open the Debugger or Trace window.

ERROR Command

Generate a specific Visual FoxPro error to test your error handling.

ERROR( ) Function

Return an error number.

LINENO( ) Function

Return an executing program line.

MESSAGE( ) Function

Return an error message string.

ON ERROR Command

Execute a command when an error occurs.

ON( ) Function

Return commands assigned to error handling commands.

ON SHUTDOWN Command

Executes a command when exiting Visual FoxPro or Windows.

PROGRAM( ) Function OR SYS(16) - Executing Program File Name

Return the name of the currently executing program.

RETRY Command

Run the most recently executed command.

SET AUTOINCERROR Command

Generate an error when attempting to update or insert values in an autoincrementing field.

SYS(2018) - Error Message Parameter

Return any current error message parameter.

SYS(2410) - Error Handler

Return error handler type for an error.

TRY...CATCH...FINALLY Command

Handle errors and exceptions that might occur while running a block of code.

See Also

Reference

Debugger Window

Trace Window

Other Resources

Testing and Debugging Applications

Programming

Language Categories