unhandled-exception

Why is Visual Studio looping when debugging UnhandledException events

只谈情不闲聊 提交于 2019-11-29 18:55:51
问题 (This looks very similar to C# UnhandledException from another thread keeps looping, but am not trying to catch the exception here, just get the chance to log something) I have some very simple C# code that sets up an UnhandledException event handler, then throws an exception: class Program { static void Main(string[] args) { AppDomain currentDomain = AppDomain.CurrentDomain; //currentDomain.UnhandledException += new UnhandledExceptionEventHandler(currentDomain_UnhandledException);

Python won't exit when called with absolute path from cron or subshell

我的梦境 提交于 2019-11-29 12:08:55
I have some python scripts that run via cron, and they no longer exit correctly when the script is called with an absolute path. They will hang until the process is terminated. I believe it happened after I moved /var and /home to a different partition. I checked into the environment variables and couldn't see anything obviously wrong, this happens either when run with cron or a bash subshell, but not when run directly. If I run it as a subshell it hangs until I kill it (ctrl-c) and then gives me the output. [wotstats@rock test]$ echo 'assert 0==1, "fails"' > test.py [wotstats@rock test]$ /bin

How to catch a global error with NodeJS

我们两清 提交于 2019-11-29 11:46:24
I am getting an unhandled error but not sure where it's coming from. My app has several http.request(options, callback).end() in different methods, with the callback's trapping "uncaughtException" and "error". I'd like to know which of my methods initiated this issue. Below is the error I get. It is random. Any ideas how to track this down? I was hoping for some global way of trapping unhandled errors. events.js:85 throw er; // Unhandled 'error' event ^ Error: read ECONNRESET at exports._errnoException (util.js:746:11) at TCP.onread (net.js:559:26) Ross The Boss ECONNRESET means that the other

How to start activity from UncaughtExceptionHandler if this is main thread crashed?

谁说我不能喝 提交于 2019-11-29 07:17:19
I am trying to start an error-reporting activty if unhandled exception detected. The problem is with exceptions thrown from main thread. Is there any way to start an activity if main thread crashed? The approach I've seen used for error catching in an UncaughtExcpetionHandler is to write the crash data out to file and then start the error handling Activity when the application is restarted based on the existence of the crash data file. Depending on what you want your Activity to do, this might work for you. I think this is the wrong way to go about it. What you need to do is make sure you

In ASP.NET MVC what is the best show unhandled exceptions in my view?

℡╲_俬逩灬. 提交于 2019-11-28 18:22:41
I have the following in my web.config: <customErrors mode="On" defaultRedirect="Error"> <error statusCode="404" redirect="Error/NotFound" /> </customErrors> I have a [HandleError] at the top of my HomeController class. To test, I create and action that simply throws an exception . . and it redirects to my ErrorController/Index method but when it gets to my view which binds to HandleErrorInfo my model is null so I somehow have lost the reference to the error. I am sure it has something to do with the Error getting lost in the redirect so I wanted to see if i was missing something and if anyone

Catch unhandled exceptions from async

Deadly 提交于 2019-11-28 06:52:58
When an async method that is awaited upon throws an exception, the exception is stored somewhere and throwing it is delayed. In a WinForms or WPF application, it uses SynchronizationContext.Current to post throwing of the exception. However, in e.g. a console application, it throws the exception on a thread pool and it brings down the application. How can I prevent exceptions thrown from an async method from bringing down the application? EDIT: Appearantly the issue I'm describing is because I have void async methods. See comments. How can I prevent exceptions thrown from an async method from

Python won't exit when called with absolute path from cron or subshell

不羁的心 提交于 2019-11-28 05:32:08
问题 I have some python scripts that run via cron, and they no longer exit correctly when the script is called with an absolute path. They will hang until the process is terminated. I believe it happened after I moved /var and /home to a different partition. I checked into the environment variables and couldn't see anything obviously wrong, this happens either when run with cron or a bash subshell, but not when run directly. If I run it as a subshell it hangs until I kill it (ctrl-c) and then

Unhandled Error with CreateProcess [duplicate]

雨燕双飞 提交于 2019-11-28 04:31:03
问题 This question already has an answer here: CreateProcess method ends up with an error 1 answer I was reading about CreateProcess function in c++ and I wanted to try it. Basic idea of the code is to have my main execute another process (notepad). Really, it’s just the basic code. When I run the program, I get: First-chance exception at 0x752bb763 in createprocess.exe: 0xC0000005: Access violation writing location 0x00be57b8. Unhandled exception at 0x752bb763 in createprocess.exe: 0xC0000005:

How to start activity from UncaughtExceptionHandler if this is main thread crashed?

二次信任 提交于 2019-11-28 00:58:58
问题 I am trying to start an error-reporting activty if unhandled exception detected. The problem is with exceptions thrown from main thread. Is there any way to start an activity if main thread crashed? 回答1: The approach I've seen used for error catching in an UncaughtExcpetionHandler is to write the crash data out to file and then start the error handling Activity when the application is restarted based on the existence of the crash data file. Depending on what you want your Activity to do, this

Why is UnhandledExceptionEventArgs.ExceptionObject an object and not an Exception?

我只是一个虾纸丫 提交于 2019-11-27 18:38:34
Why is UnhandledExceptionEventArgs.ExceptionObject an object and not an Exception ? I am attaching to AppDomain.UnhandledException . I would like to cast UnhandledExceptionEventArgs.ExceptionObject to an Exception and interogate it. And with this in mind will it ever be null? The MSDN documentation is not exatly useful. Gets the unhandled exception object. This cannot be typed to Exception because it's possible to throw objects in .Net that do not derive from System.Exception. This is not possible in C# or VB.Net but it is possible in other CLR based languages. Hence the API must support this