Click here to Skip to main content
Click here to Skip to main content

Error Handling In Visual Basic Projects

, 15 Oct 2007
Rate this:
Please Sign up or sign in to vote.
Insert Error Hanler In Your Visual Basic Projects Easily

Download Error Handler (Right Click And Select Save Target As... )

URL For Download: http://helia2000.tripod.com/index_files/ErrorHandler.htm

Hello

When A System Developed By Programmer The Important Step IS Supporting System and

Debugging System The most Popular Step Is Reporting Bugs By Users That Using This Systems But Somtimes Users Dont Reports Error.

My End Goal Of This Error Handler Program Is Help to VB system Developers To Reporting This Bugs. This System Is Very UseFull Tools For This Idea.It Is Inserts Error HAndler Tag In Vb Forms By This Error Handling You Can see Which User Have Error and What Is The error Descrpition And Which Module Or form Or UserControl Or Reports Has erros And In This Form Or UserControl Or Reports Which Function Or Sub Has errors .

You Can Remove This Error Handler TAg After Inserting Easily.

I Use This Syetem In Four Big Syestem Like Accounting... And I Acquiesce from This Tool

Please Send Me your FeedBack About This Program To Improve It.

Thank you

ErrorHandling Main Maenu

Error Handler Config Menu

Sample Code Before Change

Private Sub Form_Load()
'My Code Starts here

'My code end Here


End Sub

Sample Code After Inserting Error Handler

Private Sub Form_Load()
On Error GoTo Err_Label: '*ErrorHandler Tag*'
Dim StrSubName As String '*ErrorHandler Tag*'
Dim ErrorDescription As String '*ErrorHandler Tag*'
StrSubName = "Form_Load" '*ErrorHandler Tag*'
Me.MousePointer = 11 '*ErrorHandler Tag*'

'My Code Starts here

'My code end Here


Me.MousePointer = 1 '*ErrorHandler Tag*'
Exit Sub '*ErrorHandler Tag*'
Err_Label: '*ErrorHandler Tag*'

ErrorDescription = Me.Name + "-->" + StrSubName + "-->" + Err.Description '*ErrorHandler Tag*'
MsgBox ErrorDescription + vbCrLf + "Please Contact With Your System Administrator", vbCritical, "ERROR HANDLER" '*ErrorHandler Tag*'
MousePointer = 1 '*ErrorHandler Tag*'
ErrorDescription = Replace(ErrorDescription, "'", " ") '*ErrorHandler Tag*'
MainConnection.Execute "INSERT INTO Errors_Log (ComputerName,Error_Date,Error_Time,UserName,Error_Description) VALUES ('" + sGetComputerName + "','" & Date & "','" & Time & "','" & CurUser & "','" & ErrorDescription & "')" '*ErrorHandler Tag*'
End Sub

Houshang Karami

Iran-Tehran

My Email Is: Houshang.karami@gmail.com

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

hooshang Karami
Web Developer
Iran (Islamic Republic Of) Iran (Islamic Republic Of)
i am programmer and i am programming 10 year
I am VB Progarammer
Asp.net Webdevelpoer Intranet Site Developer
C#.net Programmer
in SqlServer DatabAse
I am Developing Accounting System And Sell Systems
In C# Or VB.net In SqlServer 2000 ,
I like Programming And I live With Programming
iran tehran
 


Comments and Discussions

 
GeneralYour Answers Pinmemberhooshang Karami4-Sep-05 17:44 
Question??? Pinmemberpgiustinoni4-Sep-05 4:56 
AnswerRe: ??? PinmemberJim Crafton4-Sep-05 8:34 
GeneralRe: ??? Pinmemberhooshang Karami14-Apr-07 0:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 16 Oct 2007
Article Copyright 2005 by hooshang Karami
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid