473,398 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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.CurrentDomain.UnhandledException event and the
Applciation.ThreadException 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.CurrentDomain.UnhandledException event and the
Application.ThreadException 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 964

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

Similar topics

5
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...
3
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....
14
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...
44
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...
2
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...
3
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...
4
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...
3
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...
132
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...

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.