Results 1 to 5 of 5

Thread: [RESOLVED] Deployment and Exception Handling

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2004
    Posts
    7

    Resolved [RESOLVED] Deployment and Exception Handling

    I have an application which has a "global" exception handler that runs at the very begining of the application (see code below). Everything runs fine in the IDE, however, when I install the application on computers the "global" exception never fires. I am using the VS.NET 2005 Setup Project to create the setup files which are installed on pc's. It would seem that there is some problem with the deployment version of the application, but I dont know for sure.

    Any idea's how to fix the problem?

    Code:
     Try
           Application.Run(LogInForm)
     Catch eData As DataException
    
           MessageBox.Show(eData.Message, "ADO.NET Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    
     Catch eSql As SqlException
               
            MessageBox.Show(eSql.Message, "SQL Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    
    
     Catch eSystem As Exception
               
            MessageBox.Show(eSystem.Message, "General System Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
     
     End Try

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Deployment and Exception Handling

    If you run the exe run on your development machine does the event fire?

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Deployment and Exception Handling

    Make sure you set to "Release" instead of "Debug" when compiling the app before deploying it.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2004
    Posts
    7

    Re: Deployment and Exception Handling

    I tried to run the .exe on my development machine and it didn't fire.

    I also tried setting both the application and deployment configurations to release instead of debug.... still no luck.

    Any other suggestions? Are there any other preq's it needs other than the defaults?

  5. #5

    Thread Starter
    New Member
    Join Date
    Sep 2004
    Posts
    7

    Re: Deployment and Exception Handling

    I decided to try a different way to handle the exceptions. I used something similar to what is show at this website. Seems to be working alright after I deploy the application.

    Thanks for the help!

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