Questions tagged [unhandled-exception]

An unhandled exception is an Exception that is thrown by execution but is never caught by the program, which results in a Exception Stack.

An unhandled exception is an Exception that is thrown by execution but is never caught by the program, which results in a Exception Stack.

This could be avoided by catching the exception in a try-catch statement, but it is not always appropriate to catch every possible exception. Sometimes the exception is the result of the client making a mistake rather than something that occurred where it is thrown, therefore the client should be informed of the exception. Most of the time however, it is user friendly to not propagate exceptions.

Read more here.

762 questions
5
votes
1 answer

How to capture unhandled exceptions on Windows Services?

I use AppDomain.UnhandledException Event to capture unhandled exceptions on WPF, Console and WinForms apps. But the same code isn't working on Windows Services. What should I do?
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
5
votes
6 answers

When can an exception in a .NET WinForms app just get eaten without being caught or bubbling up to a windows exception?

In several places in our code, we notice that if running under debugger it'll show that there's an unhandled exception in the code, however if running outside the debugger it will just ignore the exception completely as if it were caught. We have…
Davy8
  • 30,868
  • 25
  • 115
  • 173
5
votes
4 answers

CLR exits when a thread gets unhandled exception

I have background threads in my application. When one of the threads gets an exception that is not handled the entire CLR exits. Is it normal behavior, or is it a bug in the CLR? I would expect that the thread will exit but the CLR will continue…
ofer alper
  • 71
  • 3
5
votes
1 answer

uwp app (.net native) and unhandled exception

I created uwp app(.Net native) for Windows 10 desktop. I use HockeyApp for collect live crash reports. Stack trace not informative. This is a long-standing problem and it does not have a solution. I tried this but it not working. I get these…
FetFrumos
  • 5,388
  • 8
  • 60
  • 98
5
votes
2 answers

Visual studio breaks on exception that IS handled with unhandled exception dialog

My code calls a WCF service that is current not running. So we should expect the EndPointNotFoundException. The using statement tries to Close() the faulted connection which causes a CommunicationObjectFaultedException which is excepted. This…
Kasper van den Berg
  • 8,951
  • 4
  • 48
  • 70
5
votes
2 answers

Direct2D : Unhandled Exception In WM_RESIZE switch case

I am creating a Simple Direct2D Application. Unfortunately it is giving an unhandled exception. The function where it is taking place: void DemoApp::OnResize(UINT width, UINT height) { if (m_pRenderTarget) <----|****The exception occurs…
Dhannanjai
  • 650
  • 1
  • 8
  • 18
5
votes
3 answers

Embedded server application has stopped working after exit

I have an application that stores some data in firebird database. I'm using an embedded firebird server and EntityFramework and all works greatfully but when I close my app by x button on form I get a windows system message "application has stopped…
whizzzkey
  • 926
  • 3
  • 21
  • 52
5
votes
1 answer

Unhandled stream error in pipe in Node.js

I use local proxy in Node.js and Express with the following code: app.post('/', function(req, res){ var newurl = req.body.url; var options = { url: newurl, headers: { …
Vladislav
  • 483
  • 2
  • 6
  • 17
5
votes
1 answer

Catch unhandled exception, still shows “program stopped working” dialog

I've read in this post that to avoid the “program stopped working” dialog ,I need to catch the unhandled exception from the AppDomain. public Form1() { ///Code AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; …
Izikon
  • 902
  • 11
  • 23
5
votes
3 answers

System.Runtime.InteropServices.COMException (0x80040154)

I am getting this error when I am trying to depoly my application on a target machine. I googled and found that some of the dll's need to be registered (that are used in my application) So, I copied the dll's to System32 and did regsvr32 I then got…
Jayesh
  • 3,891
  • 11
  • 55
  • 83
5
votes
2 answers

Catch unhandled exception in WCF

In WCF, is there an event or method that catches unhandled exceptions, or do I need to put a try/catch in any method?
zvi
  • 53
  • 2
  • 4
5
votes
4 answers

Serialization Code Causes Unhandled Exception

I am attempting to create a some code that can serialize and deserialize a library of Classes into an AutoCAD drawing. This question has little to do with AutoCAD other than it being the reason why I cannot debug it by normal means. I started this…
5
votes
2 answers

Handling rude application aborts in .NET

I know I'm opening myself to a royal flaming by even asking this, but I thought I would see if StackOverflow has any solutions to a problem that I'm having... I have a C# application that is failing at a client site in a way that I am unable to…
StarBright
  • 251
  • 1
  • 2
  • 5
4
votes
0 answers

PlatformException Error (channel-error, Unable to establish connection on channel., null, null) with Flutter on using firebase libraries for iOS

I am getting this error in flutter while building for iOS during debug build pointing to Firebase.initializeApp. Not able to understand the reason here. here is my pubspec.yaml for firebase libraries: (using flutter 2.10.2/ dart 2.16.1) …
Jai Thomso
  • 51
  • 1
  • 2
4
votes
3 answers

Exceptions on .Net ThreadPool Threads

Duplicate: How to catch exceptions from a ThreadPool.QueueUserWorkItem? I am queueing up multiple delegates on the .Net ThreadPool for a large number of independant remoting calls that themselves call multiple databases and other offline…
Charles Bretana
  • 143,358
  • 22
  • 150
  • 216