Results 1 to 6 of 6

Thread: [RESOLVED] [2008] Help with creating an error handler

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2008
    Location
    Nowhere
    Posts
    427

    Resolved [RESOLVED] [2008] Help with creating an error handler

    Ok i would like to create an error handler that would pop up anytime there is an error and state the type of error and number if possible. An example i tested was
    Code:
             Try
    
                'Any Protected Code
    
                prcTextFile.StartInfo.FileName = ("C:\Program Files\ErrorHandler\VbNetError.txt ")
    
                prcTextFile.Start ()
    
                If blnFlg = True Then Exit Try
    
            Catch
    
                'Error Handling Logic/Code
    
                MessageBox.Show ("Unable to locate the desired file")
    
            Finally
    
                'Execution Resumes Here
    
                MessageBox.Show ("Error Handler Complete")
    
            End Try
    And it worked fine but i want to know if this can be used to handle any kind of error and what other options are there.

    Edit* To be more clear this is what im hoping to find something for. Lets say your running a program and an error occurs. Instead of giving you the windows message box it catches the error and send it to your error handler along with the Error number and message of the error. Thats what im hoping for and i know its possible im just not 100% sure on how to do it.

    I know that declarations have to be used and something like this to show up in the error handler:
    "Textbox1(Error.Name & " (" & ErrorMessage.ToString ")")"
    Last edited by youngbucks; Jul 4th, 2008 at 01:19 AM.
    "Programming is like sex. One mistake and you have to support it for the rest of your life." ~Michael Sinz


    Code Snippets/Usefull Links:
    WinRAR DLL|Vista Style Form|Krypton Component Library|Windows Form Aero|Parsing XML files|Calculate File's CRC 32|Download a list of files.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width