#ERROR (display source generation error) 

Top  Previous  Next

 

#ERROR( message )

#ERROR

Displays a source generation error.

message

A string constant, user-defined symbol, or expression containing an error message to display in the Source Generation window.

#ERROR displays a message in the Source Generation window. This could be information for the user. It may also alert the user that they made some error which will cause the procedure Template to generate invalid source code which could create compiler errors.

When a #ERROR statement is encountered at source code generation time, its message is displayed. The user may choose to abort the compile and link process, or continue on to the compiler.

Example:

#PROCEDURE(SampleProc,'This is a sample procedure')

#PROMPT('Access Key',KEY),%SampleAccessKey

 #IF(%SampleAccessKey = %NULL)           #!IF the user did not enter a Key

   #SET(%ErrorSymbol,(%Procedure & ' Access Key blank')

  #ERROR(%ErrorSymbol)

  #ERROR('This error is Fatal -- DO NOT CONTINUE')

  #ABORT

 #ENDIF