Re: Web Services Client Error

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Can you post the code you're using to catch the exception? It's unusual, to
say the least, to be unable to catch a .NET exception.

The code below is the only code in the main program. I use this as a
"trap-all" but in this case it does not seem to be getting fired.
try
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//
// Set up the global data before the application
starts.
//
GlobalData.OptionsFileName = null;
GlobalData.ProductName = null;
GlobalData.UserPreferences = null;
//
Application.Run(new frmMain());
}
catch (Exception ex)
{
StringBuilder message;

message = new StringBuilder();
// Code to build error message and write to log and
message box.
}
The only complication which has just come to mind is threading - am I
correct in assuming that by wrapping the whole program in a block like
this that a thread created in the program would also trigger this
exception handler?

Regards,
Mark
.



Relevant Pages

  • ReaderWriterLock with low timeout throws unhandled exception
    ... I am working on improving my threading skills and came across a question. ... When working with the ReaderWriterLock class, ... The logic answer I can think of is, that if one specifies a timeout, then ... the CLR respects that and throws an exception regardless of what's inside ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Starting a thread before wxPython bootup ... interesting.
    ... I'm having an issue with mixing wxPython and threading ... ... That's quite a broad and poorly specified problem to ask people to ... exception without saying what it was. ...
    (comp.lang.python)
  • Logging and threading
    ... I'm having some problems getting the logging module to work with the ... threading module. ... I/O operation on closed file ... The exception isn't fatal though, as the print "finished" line is ...
    (comp.lang.python)
  • Re: DTS from C#
    ... From a console application, WinForms, ASP.NET? ... > What threading option are you using? ... whatever the default in C# code is - as an ex-VB head ... Yes I am catching the COM exception explicity. ...
    (microsoft.public.sqlserver.dts)
  • Re: why does catching errors that arent thrown give syntax errors?
    ... as appropriate as giving a syntax error for "if ". ... |if | is not a compile-time error. ... What about wrapping the line that throws the exception in if ...
    (comp.lang.java.programmer)