james mckay dot net

because there are few things that are less logical than business logic

Reinventing the wheel, badly

A few years ago, I inherited a VB.NET application in which every method (many of which were four hundred lines long, copied and pasted all over the place, and peppered with vague sounding variable names such as blnRunIf and blnRunElse) contained this boilerplate code:

[code lang=”vb”]
Sub MyMethod()
Try
‘
‘ ** snip ** ‘
‘
Catch ex As Exception
Throw New Exception ("MyClass.MyMethod::" + ex.Message)
End Try
End Sub
[/code]

Those who do not understand Exception.StackTrace are doomed to reinvent it, badly.