MESSAGE( ) Function Example

The following example displays output from MESSAGE( ) and MESSAGE(1).

ON ERROR DO Errhand

*** The next line should generate an error ***

USE Nodatabase
ON ERROR     && restore system error handler
PROCEDURE Errhand
? 'Line of code with error: ' + MESSAGE(1) 
? 'Error number: ' + STR(ERROR( ))
? 'Error message: ' + MESSAGE( )