Let this Lotus developer sit you down and spin you a yarn about how he filled the hard drive on his high-end server with more than a million agent logs in less than an hour. You may get a chuckle and learn something at the same time.
Being a good developer, all of my LotusScript has an Error handler following the pattern:
Sub MyProcedure Dim ....
On Error Goto Err_MyProcedure ... my code Exit_MyProcedure: Exit Sub Err_MyProcedure: Call LogThisError("MyProcedure",Err,Erl,Error$) 'Generalized
Errorhandler creating a document in a log database Resume Exit_MyProcedure End Sub
On one occasion, there was a check that needed to be performed, regardless of whether an error was happening or not, so I coded it like this:
Exit_MyProcedure: if doc.hasEmbedded then ...
Unfortunately the doc was not set at this time, so the execution jumped to the error label, created an entry in the database and then jumped back to the faulty code. Since we had quite a powerful server, I managed to create 1.2 million documents in the agent log in less than 30 minutes. Needless to say, the hard disk was full.
Lesson learned: If there is a need for code in the Exit_ Label, have an On Error Resume next before the ...
Do you have your own blooper? Send it in and claim your fame.
Every story in our bloopers series comes to us directly from a SearchDomino.com administrator, developer or consultant. For obvious reasons, some contributors choose to remain anonymous.
Read all SearchDomino.com's true bloopers.