Discussion:
MESSAGE()
(too old to reply)
Marc
2010-02-16 12:46:14 UTC
Permalink
In my program I open a database exclusively.
If the database is already opened it prompt a message
File access denied <database filename>
This error is handled by TRY.. CATCH

But after that when I execute some command lines as follows
MESSAGE() value is getting chaned to different messages
Eg: (1) IF VARTYPE(pcCreateGlobalMessage)="C" AND
!EMPTY(pcCreateGlobalMessage)
** The MESSAGE() value is "File access is denied
pcCreateGlobalMessage"

(2) THIS.NEWOBJECT("oDummy","zDummy")
** The MESSAGE() value is "File access is denied oDummy"

Actually there are no errors in above command lines
Pls someone tell me what may be the reason for this.
Dan Freeman
2010-02-16 13:09:26 UTC
Permalink
The return value of Message() changes routinely during program
execution. If you need to capture it at a specific time, you should
store it at that time.

I don't see how the two lines of code you've posted could cause the
errors you've posted, but I can easily see how the *next* command after
them would.

Dan
Post by Marc
In my program I open a database exclusively.
If the database is already opened it prompt a message
File access denied <database filename>
This error is handled by TRY.. CATCH
But after that when I execute some command lines as follows
MESSAGE() value is getting chaned to different messages
Eg: (1) IF VARTYPE(pcCreateGlobalMessage)="C" AND
!EMPTY(pcCreateGlobalMessage)
** The MESSAGE() value is "File access is denied
pcCreateGlobalMessage"
(2) THIS.NEWOBJECT("oDummy","zDummy")
** The MESSAGE() value is "File access is denied oDummy"
Actually there are no errors in above command lines
Pls someone tell me what may be the reason for this.
Continue reading on narkive:
Loading...