Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Advanced
Nov 6, 2000

Error Message Passing Throughout Nested Components


Nowadays, components are popularly used in VB projects. These components can sometimes make it hard to determine which component has an error when the application stops running. This is especially true with nested components in a project.

By following the structure below to develop your nested components, you can obtain detailed error information from your application. This allows you to determine, without having to work through your code, which method in which component has the error.

Component creation:
  
'/----------------------------------------------------------- 
' Component1 
' 
Public Sub GetName(ByRef strName As String) 
On Error GoTo EndOfSub 
    Dim objComponent2 As New Component2  'create Component2 
    Dim strErrMsg As String 
    Dim lYourErrorNumber As Long 
    strErrMsg = 
Peter Luo
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap