Hi all,
i'm trying to write an exception handler for my application, so in case an
exception occurs anywhere in my application, the exception has to be
catched.
At this moment i'm doing it via the following code:
Application.Thr eadException += new
System.Threadin g.ThreadExcepti onEventHandler( Application_Thr eadException);
But this doesn't work for me. If an exception is being thrown, it isn't
catched by the ThreadException event and a exception is being displayed.
Could someone please help me with this problem?
Thanks in advance,
Mathieu 2 1348
There's also an UnhandledExcept ion event on the AppDomain, try handling that
too.
"Mathieu Brüning" <ma************ @kabelfoon.nl> wrote in message
news:43******** *************** @news.kabelfoon .nl... Hi all,
i'm trying to write an exception handler for my application, so in case an exception occurs anywhere in my application, the exception has to be catched.
At this moment i'm doing it via the following code: Application.Thr eadException += new System.Threadin g.ThreadExcepti onEventHandler( Application_Thr eadException);
But this doesn't work for me. If an exception is being thrown, it isn't catched by the ThreadException event and a exception is being displayed.
Could someone please help me with this problem?
Thanks in advance,
Mathieu
Mathieu,
The ThreadException event on the Application class is only fired for
exceptions that take place on the main UI thread. If the exception occurs
on a thread other than the main UI thread, you need to use the app domain
unhandled exception handler.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Mathieu Brüning" <ma************ @kabelfoon.nl> wrote in message
news:43******** *************** @news.kabelfoon .nl... Hi all,
i'm trying to write an exception handler for my application, so in case an exception occurs anywhere in my application, the exception has to be catched.
At this moment i'm doing it via the following code: Application.Thr eadException += new System.Threadin g.ThreadExcepti onEventHandler( Application_Thr eadException);
But this doesn't work for me. If an exception is being thrown, it isn't catched by the ThreadException event and a exception is being displayed.
Could someone please help me with this problem?
Thanks in advance,
Mathieu
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Altramagnus |
last post by:
I have 30 - 40 type of different window.
For each type I need about 20 instances of the window.
When I try to create them, I get "Error creating window handle"
My guess is there is a maximum number of window handle, because if I reduce
to about 2 instances of each window,
it can run. But not 20 instances of each window.
Does anyone know what the problem is? is it really because it exceeds the
maximum number of window handle?
|
by: helpful sql |
last post by:
Hi all,
I am getting an exception from asp.net application that says error
creating section handler.
Here is my configuration section from web.config file:
<configSections>
<section name="ProposalTemplateNameSpaces"
type="System.Configuration.NameValueSectionHandler" />
</configSections>
|
by: DraguVaso |
last post by:
Hi,
In my application, on some given actions while debugging in Visual Studio, I
suddenly get a "System.ComponentModel.Win32Exception was unhandled"
Message="Error creating window handle." exception.
The problem is that this exception isn't raised somewhere in a method, so it
just shows up, and it causes the application to shut down.
Is there anyway how to catch this kinds of exceptions? Can I put somewhere a
|
by: Ange T |
last post by:
Hi there,
I'm having pain with the VB behind an Access form. The form is used to
create reports in Excel based on the details entered in the form. This
has always worked without error on my machine (NT4, Access 2k),
however as soon as I attempt to create anything on another machine
(NT4, Access 2k) which most users will be working from, I receive an
automation error.
The problem line with the code is:
|
by: deko |
last post by:
I use this convention frequently:
Exit_Here:
Exit Sub
HandleErr:
Select Case Err.Number
Case 3163
Resume Next
Case 3376
Resume Next
| |
by: Peter Frost |
last post by:
Please help
I don't know if this is possible but what I would really like to do is
to use On Error Goto to capture the code that is being executed when
an error occurs.
Any help would be much appreciated.
Thanks in advance
|
by: thehitman |
last post by:
I used an article "Creating a Flexible Configuration Section Handler
"(http://www.15seconds.com/issue/040504.htm). The Console application
works with app.config but with the web.config. The Namespace change and
inserting into a class library are the only differences in the code.
In the web config
<!-- Config section Group and Sections Declaration -->
<configSections>
<section
name="DropDownListTableSettings"
|
by: Motoma |
last post by:
This article is cross posted from my personal blog. You can find the original article, in all its splendor, at http://motomastyle.com/creating-a-mysql-data-abstraction-layer-in-php/.
Introduction:
The goal of this tutorial is to design a Data Abstraction Layer (DAL) in PHP, that will allow us to ignore the intricacies of MySQL and focus our attention on our Application Layer and Business Logic. Hopefully, by the end of this guide, you will...
|
by: jdokos |
last post by:
Hello All,
I have a procedure that is getting -443 after upgrading to V9.5 FP1.
The procedure was written to output only the SQLCODE. Here is the
output that is returned:
Value of output parameters
--------------------------
Parameter Name : V_OUTPUT
Parameter Value : ERR:-443
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |