Click here to Skip to main content
Licence 
First Posted 3 Sep 2005
Views 22,235
Bookmarked 9 times

Error Handling In Visual Basic Projects

By | 15 Oct 2007 | Article
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)

Member

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
 



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralYour Answers Pinmemberhooshang Karami17:44 4 Sep '05  
Question??? Pinmemberpgiustinoni4:56 4 Sep '05  
AnswerRe: ??? PinmemberJim Crafton8:34 4 Sep '05  
GeneralRe: ??? Pinmemberhooshang Karami0:00 14 Apr '07  

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.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 16 Oct 2007
Article Copyright 2005 by hooshang Karami
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid