unhandled-exception

NLog: Force BufferingTargetWrapper to empty on AppDomain UnhandledException

柔情痞子 提交于 2019-12-06 10:01:08
I have NLog configured in my application to to use the BufferingTargetWrapper for sending emails with the MailTarget . The problem I'm running into is I can not find a way to force NLog to empty the BufferingTargetWrapper before the application exits from Unhandled Exceptions. I tried calling LogManager.Flush() and LogManager.DisableLogging() from the Current App Domain's UnhandledException Event but it does not seam to work. What would I need to do to make it send the emails? you can call the BufferingTargetWrapper and force it to write the logs. Its strange that the LogManger.Flush doesn't

Unhandled rejection error Bluebird

强颜欢笑 提交于 2019-12-05 10:14:30
I have the following code. And it works as expected without throwing a unhandled rejection error. p = new Promise (fulfill, reject) -> reject new Error 'some error' p.catch (error) -> console.log error Now, the second code example does throw an unhandled rejection error. Can someone explain to me why this is happening when im clearly handling the error. p = new Promise (fulfill, reject) -> reject new Error 'some error' p.then -> console.log 'ok' p.catch (error) -> console.log error Btw. I'm testing in chrome and bluebird v3.4.7 When you chain Promises , each chain is treated as new instance of

Face Recognition in Video using OpenCV gives unhandled exception

ⅰ亾dé卋堺 提交于 2019-12-05 04:46:25
I am trying to use the Face Recognition in video sample provided with OpenCV. The only modification I've done is: Instead of using command line arguments to provide CSV and Cascade classifier paths, I have given them directly in the code. This is the code: #include "stdafx.h" #include "opencv2/core/core.hpp" #include "opencv2/contrib/contrib.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/objdetect/objdetect.hpp" #include <iostream> #include <fstream> #include <sstream> using namespace cv; using namespace std; static void read_csv(const

Why does an unhandled exception not terminate a process while debugging?

狂风中的少年 提交于 2019-12-05 02:42:28
问题 This is a behavior I noticed several times before and I would like to know the reason behind that. If you run the following program under the (Visual Studio 2008) debugger, the debugger will keep breaking on the throw statement no matter how often you continue debugging. You have to stop debugging to get out there. I would expect that the debugger breaks once and then the process terminates as it happens if you run the program without the debugger. Is anybody aware of a good reason for this

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

喜你入骨 提交于 2019-12-05 00:26:29
问题 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

Infinite loop invalidating the TimeManager

爱⌒轻易说出口 提交于 2019-12-04 23:39:59
I am experiencing a very tricky defect in my WPF application to track down. The error message is: An infinite loop appears to have resulted from repeatedly invalidating the TimeManager during the Layout/Render process. The stack trace (for what it's worth) is: at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading

What happens if an unhandled exception is thrown in Application_Start?

早过忘川 提交于 2019-12-04 23:30:42
... will the Application_Start method be ran again for the next request(s) or not? Does it depend on ASP.NET version, hosting server version and/or other context? I am trying to determine if it's a good thing to load critical assemblies there or not. For example data access assemblies which are vital to the functioning of the whole application or not. Failure to load such assembly would make subsequent requests useless. Application_Start will be fired only once for each web application so in your case, the start will not happen again for subsequent requests. Typically, I prefer to put one time

Prevent outer exception from being discarded when thrown from BeginInvoke

杀马特。学长 韩版系。学妹 提交于 2019-12-04 18:21:47
问题 I have a handler for Application.ThreadException, but I'm finding that exceptions aren't always getting passed to it correctly. Specifically, if I throw an exception-with-inner-exception from a BeginInvoke callback, my ThreadException handler doesn't get the outer exception -- it only gets the inner exception. Example code: public Form1() { InitializeComponent(); Application.ThreadException += (sender, e) => MessageBox.Show(e.Exception.ToString()); } private void button1_Click(object sender,

Unhandled Exception Error [closed]

回眸只為那壹抹淺笑 提交于 2019-12-04 15:18:51
I am experiencing an unhandled exception within xutility if (_Myproxy != 0) { // proxy allocated, drain it _Lockit _Lock(_LOCK_DEBUG); for (_Iterator_base12 **_Pnext = &_Myproxy->_Myfirstiter; *_Pnext != 0; *_Pnext = (*_Pnext)->_Mynextiter) (*_Pnext)->_Myproxy = 0; <------- unhandled exception here _Myproxy->_Myfirstiter = 0; } I do not have control over xutility . This unhandled exception train stems from std::string BinarySearchFile::readT(long filePointerLocation, long sizeOfData) { try{ if(binary_search_file){ std::string data; binary_search_file.seekp(filePointerLocation); binary_search

How to crash a process on Windows-7 without getting the WER dialog?

六月ゝ 毕业季﹏ 提交于 2019-12-04 10:51:08
问题 Is it possible to crash a regular user-mode process on Windows-7 without getting the Windows Error Reporting (WER) dialog? (When and if WER is normally enabled and no specific flags are applied.) Note: I'm not interested in disabling WER , I'm interested in crash scenarios where WER isn't launched although it should and Windows "silently" terminates an app. On Windows XP, it is pretty trivial to write a C or C++ application (in user mode) that messes up its own address space in such a way