Just as treehouses usually don't need reinforcing steel girders, a 12-tier approach for a simple application is usually a bit more than is generally needed. But that doesn't stop Roy's colleague. No, she'll be the first to rent an earthmover to help build a sandcastle. But just try to imagine how fun the error handling would get when a function moves beyond the complexity of always returning True.
Private Function CheckOperation() As Boolean Dim METHOD_NAME As String = "CheckOperation" Dim CODE_ERROR As String = "01" Dim MESSAGE_ERROR As String = "Cannot return true." Try Return True Catch ex As ControledError Throw ex Catch ex As Exception Dim ed As New ErrorData(CLASS_NAME, METHOD_NAME, CODE_ERROR, MESSAGE_ERROR, ex) Dim ce As New ControledError(ed) Throw ce End Try End Function
[Advertisement]
BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!