Manage Learn to apply best practices and optimize your operations.

True Domino Blooper #21: The error handling error

Let this Lotus developer sit you down and spin you a yarn about how he filled the hard drive on his server with more than a million agent logs in less than an hour.

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.

MORE ON THIS TOPIC:

Read all SearchDomino.com's true bloopers.

Dig Deeper on Domino Resources - Part 2

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close