HTML5, CSS3, jQuery, JSON, Responsive Design...

Designer 8.5.1 Error Trapping

Michael Brown   October 14 2009 04:13:58 AM
One of the nice features of the new 8.5.1 Designer is its error trapping features. These are leaps and bounds above previous versions of Designer.

For a start, you can save your code even if it's got compilation errors in it.  Yes, that's right!!  No more having to comment out shitloads of code, so you can find out a compilation error buried in a library somewhere, only to come back and realise that you can't remember which lines you commented out just to get the damned agent saved!

Here's another, simple example of the new error trapping features.  When I looked at some existing databases in the 8.5.1 Designer, I noticed that some of them were marked with a small red cross. This one, for example:

Error flagged on database icon in Designer 8.5.1

When I opened the database branch, I could see further red marks against Agents and Script Libraries:

Error flagged on Script Libraries in Designer 8.5.1

There's only one Script Library in this particular database.  If I open it, I see that the error is in the ReplaceSubString function.  When I open that function, I can see another red cross against the line of code that has the problem.  Hovering my mouse cursor over the red cross gives me a pop-up, telling me what the actual error is: "Unexpected replace..." in this case.

Error flagged on sub routine in Designer 8.5.1

I easily guessed the problem.  The developer (not me!) used replace as a variable name.  A later version of Notes came along and made replace a reserved word.  Easy to fix: I just need to use something like "replaceString" as the variable name instead.  I make the first substitution on the line that was flagged, and immediately the red cross moves down to the next line with an error.

Error flagged on code line in Designer 8.5.1

I make the change from "replace" to "replaceString" on that line too, and finally, my error crosses have gone.

Errors gone in Designer 8.5.1

At least, they've gone at that level.  In the applications list on the left hand of the designer, my Script Libraries are still flagged with a red cross.  I had to do a Tools->Recompile LotusScript to finally get rid of the red crosses at that level.  Not even shutting down and re-opening the Designer worked at first.




Comments

1Paul Withers  10/14/2009 7:43:31 AM  Designer 8.5.1 Error Trapping

Turning on Build Automatically got rid of the red crosses for me. There's also a preference for Enable automatic recompilation of all dependencies in the LotusScript Editor preferences.

2Mike Brown  10/14/2009 2:02:45 PM  Designer 8.5.1 Error Trapping

@1,

Thanks for that, Paul. I'll give it a try.

Cheers,

- Mike

About