473,699 Members | 2,364 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Exception Disappears When Thrown From DropDrop Event In A UserCont

Jon
I have a reproducible problem. In my application I have handlers for both
the AppDomain.Curre ntDomain.Unhand ledException event and the
Applciation.Thr eadException events. Up until now these seemed to be catching
all of the unhandled errors in my application. However, it appears that if
an exception is thrown in certain UserControl subs that handle events that
the exception disappears and the application continues as if an exception had
not been thrown.

To reproduce this:
-Create a new windows form project and add a module with a sub main
-Use Application.Run from a Sub Main to start an application's form. Before
the application.Run line addhandlers for the
AppDomain.Curre ntDomain.Unhand ledException event and the
Application.Thr eadException events.
-Add a usercontrol to the project that accepts drag events
-In the user control's dragdrop sub, throw an exception
-Run the app and drag anything on to the user control. The exception gets
thrown, but nothing happens.

What's going on here? Is there another way of catching unhandled exceptions
that would solve this problem? It seems as if the exception isn't being
treated as an unhandled exception at all actually though, because I get no
error window saying there was an unhandled exception.

Thanks for taking time to check this out,
Jon

Nov 21 '05 #1
0 975

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
4030
by: Vitling | last post by:
For no apparent reason, a NullReference exception is thrown in system.dll (System.Net.Sockets.OverlappedAsyncResult.CompletionPortCallback). Since I only get a disassembly from Visual Studio, it is almost impossible to figure out what causes this. I've tried adding: AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler (SystemErrorHandler); to my main method, and a handler function:
3
5129
by: David | last post by:
Hi, Ive been trying to work this out for the past 2 days now and im not getting anywhere fast. The problem i have is that i am using Asynchronous sockets to create a Socket Client library. When i try to connect to a server that doesnt exist it raises a "Connection forcibly rejected by the resmote host" SocketException.
14
6577
by: Nenad Dobrilovic | last post by:
Hi, Is it possible for exception object to be aware of it's throwing? I want to log in the text file when exeption is thrown, not when the exception object is created (because I can create exception object that is never thrown). Thank you, Nenad
44
4213
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level user tasks should always be included in a try/catch block that actually handles any exceptions that occur (log the exception, display a message box, etc.). 2. Low-level operations that are used to carry out the high level tasks
2
2351
by: kpax | last post by:
Hi, While debugging my application when an explicit exception is thrown by me (or an implicit exception is thrown internally) which is not handled anywhere in the stack, the execution breaks as expected but I can not continue. I try start the execution and go back to running mode, but it always comes to the same line where the exception is first thrown.
3
1957
by: Giovanni Bassi | last post by:
Hello Group, I am running an operation in a different thread. There are resources that are released when the thread is done running. This is done at the end of the execution as it raises an event, and then the operation handling this event calls threaded object's dispose method. The problem is: If an exception is thrown the event is never raised, the operation never executes dispose and my resources get stuck on the memory until the app...
4
1146
by: ZorpiedoMan | last post by:
I just ran across an interesting phenon... If you bind a control, say a textbox, to a class.property, and in changing the value of the textbox an error is thrown in the class.property, you get stuck in the textbox and cannot leave: Public Class XClass Private myName as String Public Property Name as String Get
3
3894
by: Richard | last post by:
I have created a Windows service which performs various functions including setting variables in other application objects. When the service runs under Local System account the functionality all works OK, however when service runs under a user account it produces exception errors when trying to set variables in the application objects. I created a .exe test harness which does the same and works OK when run by the same user.
132
5556
by: Zorro | last post by:
The simplicity of stack unraveling of C++ is not without defective consequences. The following article points to C++ examples showing the defects. An engineer aware of defects can avoid hard-to-find bugs. http://distributed-software.blogspot.com/2007/01/c-exception-handling-is-defective.html Regards, zorabi@ZHMicro.com http://www.zhmicro.com http://distributed-software.blogspot.com
0
8687
marktang
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...
0
9174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9035
jinu1996
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...
1
8914
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,...
0
8884
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7751
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4376
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...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2009
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.