|
-
'On Error Goto' versus 'Try, Catch, Fail'
I'm not sure how 'Try, Catch, Fail' differs from the following 'On Error Goto' approach:
Sub MyProcedure()
<declare variables>
On Error GoTo PROC_ERROR:
<main code block>
PROC_EXIT:
<cleanup code>
Exit Sub
PROC_ERROR:
Select Case Err.Number
Case <first error case>
Case <next error case>
Case Else
Call LogError(Err, "MyProcedure")
End Select
GoTo PROC_EXIT:
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks