Advertisement

05.21.2008 at 03:04AM PDT, ID: 23420150
[x]
Attachment Details

Exception is not catched

Asked by Pacman in .NET, C# Programming Language, Microsoft Visual C#.Net

Tags: C#

Hello,

In my Main()-method I want to check if one of my own DLLs is available (see bottom code snippet).
Therefore I try to call a static Method of my DLL (namespace tlx_lib, Class Main).
The idea was to catch the exception as the method-call failes.

The problem:

The catch part is not executed. Instead I get the standard windows dialog telling me:

XyzApplication has encountered a problem and needs to close. We are
sorry for the inconvenience.

blah blah blah

[Send Error Report]  [Don't Send]

How to catch the exception ?
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
static void Main()
{
    try
    {
        // call dummy-method to check if DLL is available
        tlx_lib.Main.GetLibraryRelease();
    }
    catch
    {
        MessageBox.Show("tlx_lib.dll not found!");
    }
    
    //...
}
 
 
[+][-]05.21.2008 at 03:30AM PDT, ID: 21613536

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 03:32AM PDT, ID: 21613543

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 03:46AM PDT, ID: 21613611

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 04:06AM PDT, ID: 21613716

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 05:00AM PDT, ID: 21614059

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 05:00AM PDT, ID: 21614062

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 05:18AM PDT, ID: 21614206

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.21.2008 at 07:41AM PDT, ID: 21615571

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.22.2008 at 09:24AM PDT, ID: 21625273

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, C# Programming Language, Microsoft Visual C#.Net
Tags: C#
Sign Up Now!
Solution Provided By: oxyoo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]05.23.2008 at 12:26AM PDT, ID: 21630051

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.27.2008 at 12:36AM PDT, ID: 21650036

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628