Focal Point
[SOLVED] Debugging in Maintain

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7821038572

March 12, 2008, 03:27 PM
brjohnson
[SOLVED] Debugging in Maintain
Hey everyone,

This seems like a simple question, but here goes. When you receive an error message like (FOC03601) ERROR AT OR NEAR LINE 1510 IN PROCEDURE fow/Start.MAINTAIN
how do you find line 1510? My start.mnt file only has 220 lines in it. And there seems to be no way of telling what the line number is for things that may cause errors like event handlers. I keep getting this error and I have no idea what in my project is causing it. Furthermore, I have no way of knowing where line 1510 is at. It is hard to debug when you don't know where to look.

Any ideas?

This message has been edited. Last edited by: brjohnson,


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML
March 12, 2008, 05:30 PM
Dave Ayers
It sounds like you are getting in error in the form part of your .mnt file, which doesn't show in the MDE text editor.

You could use an external text editor (I like Notepad++) to see what code is at the failing line number and probably see a reference to a particular form object as a clue to fixing the error. But be careful not to save changes to the form XML, as it could corrupt your form code. In fact it would be a good idea to export your forms before doing this, just to be safe.

I use an external editor all the time, but I am familiar with the form XML, and even edit it from time to time.

There have been discussions here about changing the way that form data is stored in the Maintain system, searching the Forum would be fruitful.


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
March 13, 2008, 04:58 AM
GamP
Bryan,

What Dave suggests is almost right. It is indeed related to the xml part of the mnt file. But in this case the error refers to the .wfm file that is being generated when the maintain is deployed. This wfm file is basicly a detailed translation of what is in xml-part of the .mnt file. And like Dave suggests, use some text-editor to open the file (it's just plain text) and navigate to the line that is indicated in the error. Most probably you'll find some error situation in the near vicinity of the indicated line.

Hope this helps...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
March 13, 2008, 09:37 AM
Maintain Wizard
When I get an error that points to a line number higher than the number of lines in my MNT file, I open up the WFM and go to the line in there. An error in the WFM file usually means an error in an Event Handler or with the stack / text populating an object. I find the form that contains the error and open the file in the MDE.

Check the syntax of the events on the form. Many times the errors are here. Also, make sure there are no empty triggers. This is a trigger that has a case name and and endcase, but nothing in the middle. That can cause lots of problems.

Sometimes we create an object with a stack or a database field, and then change the name of the stack or edit the MFD. That can cause an error that has to be fixed by either editing the object or deleting it and re-adding it.

If you are really stuck and the repro is small, send it to me and I will be happy to debug.

Mark
March 13, 2008, 01:28 PM
brjohnson
Thanks everyone for your help. I did not realize you could edit the WFM file manually, but that does make it much easier to find errors. You were right Mark it was an empty event handler.

Thanks again


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML