The ERROR statement is useful for detecting unusual conditions that you don't believe should occur.  The program in the debugger on the line where this statement occurs and displays the message defined by the expressions passed to the ERROR statement in the Debugger's message area. Similar to using a Breakpoint, but in this case the program will terminate rather than continue.

 

Syntax:

'  ERROR without any parameters displays a blank message.

ERROR [expression, expression,...]

 

Parameter:

Description:

expression

An expression to be printed, separated by commas or semicolons.

 

Example:

'  When the stopPrice is less than zero,...
IF stopPrice < 0 THEN
  '  Send an error message to the user
  ERROR "The stop price was negative ", stopPrice
ENDIF

Returns:

The stop price was negative: -107.87

 

Links:

Debugger

See Also:

Test.AbortTest, Test.AbortAllTests

 


Edit Time: 9/25/2017 09:09:58 AM


Topic ID#: 306

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software