Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MESSAGE(1) and source code when error

Status
Not open for further replies.

JimmyK

Programmer
Sep 8, 2000
142
0
0
VN
Hi,
I want display command line (source code) when there is an error. MESSAGE(1) does this job when i run PRG files in developement environment.
When i build the project to EXE file. It does not work!
So, how can i work around this problem? Is there any options?

Thank
Jimmy Le
nhan_tiags@yahoo.com
 
Hi
MESSAGE(1) will provide the code only if the source code is available (even if it is an executable). Else it provides.. one of the following..

The entire program line if the line is macro substituted.
A command if the line contains a command without any additional clauses.
A command followed by three dots (...) if the line contains a command and additional clauses
*****************************************************

Same way LINENO(1) returns..the line number relative to the first line of the current program or procedure. If you omit the 1 argument, the line number is returned relative to the first line of the main program.

May be this could help you out is used properly.
*****************************************************
Hope this information is of use to you :)
ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
As an addition to Ramani's comment, if you are using referential integrity and a DBC, at runtime, the code can also give you the code of the database (which is the last line of available source code, executed). In essence, usually useless info at runtime.

HTH,
Weedz (Wietze Veld)
My private project:Download the CrownBase source code !!
 
Thank Ramani, Weedz
I solve the problem by log the value of Line(1), and then search the source code in development environment. (reluctant to do so
liplick.gif
)

Once again, thank a lot





Jimmy Le
nhan_tiags@yahoo.com
 
In the Project Info dialog (from the Project Menu), check "Debug Info". This will allow MESSAGE() to display the offending line of code from an EXE. If you do this, I highly recommend also checking "Encrypted", which will prevent somebody from viewing your source code by simply opening the EXE with a text editor.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top