ID : 123
#Error
Function
To output an error at the time of compiling.
Syntax
#Error "message"
Guaranteed entry
- Error message
- An error message is described.
Description
An error message is output to the syntax error log list during compiling (syntax check).
As an error is output, compilation is not completed and execution is not allowed.
It is used to intentionally generate an error to test the program.
Related Terms
Attention
-
Example
'!TITLE "Forced Compile Error"
' Generate a compile error forcibly and display "Error Occur" message
Sub Sample_Error
' Display message of "Error Occur" in syntax error log
#Error "Error Occur"
End Sub
ID : 123