Skip to content
Home » error trapping

error trapping

Overhead of error trapping in LotusScript

Having a little fun with the performance monitoring code from a previous post. Okay I have a warped idea of fun. I’m always interested in performance, so I decided to analyze the overhead of using an error trap (On Error statement) to handle edge cases as opposed to an “if” statement or other branch. The error trap is often easier to code because it can be a catch-all for any unanticipated problem, but handling an error condition involves the LotusScript runtime coming up with an error message, determining whether the script has defined special handling for that error, etcetera. So it can be expected to take longer than a simple test and branch. My question was, how much longer? Testing method To test this, I created two subroutines to try the two different approaches: Sub… Read More »Overhead of error trapping in LotusScript