Click here to Skip to main content
11,715,022 members (73,040 online)
   

C#

 
AnswerRe: "new" to hide base class implementation - is it useless? Pin
markovl30-Jan-13 21:20
membermarkovl30-Jan-13 21:20 
GeneralRe: "new" to hide base class implementation - is it useless? Pin
devvvy31-Jan-13 15:30
memberdevvvy31-Jan-13 15:30 
AnswerRe: "new" to hide base class implementation - is it useless? Pin
Shameel31-Jan-13 1:07
memberShameel31-Jan-13 1:07 
AnswerRe: "new" to hide base class implementation - is it useless? Pin
Abhinav S31-Jan-13 6:25
mvpAbhinav S31-Jan-13 6:25 
GeneralRe: "new" to hide base class implementation - is it useless? Pin
devvvy31-Jan-13 15:40
memberdevvvy31-Jan-13 15:40 
GeneralRe: "new" to hide base class implementation - is it useless? Pin
Abhinav S31-Jan-13 22:26
mvpAbhinav S31-Jan-13 22:26 
GeneralRe: "new" to hide base class implementation - is it useless? Pin
devvvy1-Feb-13 14:56
memberdevvvy1-Feb-13 14:56 
QuestionCatching unhandled ThreadAbortException from Main? Pin
devvvy30-Jan-13 14:56
memberdevvvy30-Jan-13 14:56 
Hi, is there any fool proof way to catch unhandled thread exception, whether it's a ThreadAbortException (caused by Thread.Abort from "Main" or UI thread) or a DivisionByZeroException (happenning within the thread function)?

I know the following won't catch it:
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(UnhandledExHandler);

And I don't think all developers will implement try-catch-finally on thread functions. How do you handle this?

I know for WPF app, in App.xaml you can define general handler for unhandled exceptions (But this will NOT catch Thread exceptions). For example, the following will NOT work:
private void Application_DispatcherUnhandledException_1(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
string Message = "Unhandled exception: " + e.Exception.ToString();
MessageBox.Show(Message);
return;
}

dev

AnswerRe: Catching unhandled ThreadAbortException from Main? Pin
Andy41130-Jan-13 22:37
memberAndy41130-Jan-13 22:37 
AnswerRe: Catching unhandled ThreadAbortException from Main? Pin
Shameel31-Jan-13 3:49
memberShameel31-Jan-13 3:49 
AnswerRe: Catching unhandled ThreadAbortException from Main? Pin
jschell31-Jan-13 8:29
memberjschell31-Jan-13 8:29 
GeneralRe: Catching unhandled ThreadAbortException from Main? Pin
devvvy31-Jan-13 15:43
memberdevvvy31-Jan-13 15:43 
GeneralRe: Catching unhandled ThreadAbortException from Main? Pin
jschell2-Feb-13 7:53
memberjschell2-Feb-13 7:53 
AnswerRe: Catching unhandled ThreadAbortException from Main? Pin
Keld Ølykke31-Jan-13 21:15
memberKeld Ølykke31-Jan-13 21:15 
QuestionGo to finally in try block Pin
vanikanc30-Jan-13 7:25
membervanikanc30-Jan-13 7:25 
AnswerRe: Go to finally in try block Pin
jibesh30-Jan-13 7:35
memberjibesh30-Jan-13 7:35 
GeneralRe: Go to finally in try block Pin
vanikanc30-Jan-13 7:37
membervanikanc30-Jan-13 7:37 
GeneralRe: Go to finally in try block Pin
jibesh30-Jan-13 7:41
memberjibesh30-Jan-13 7:41 
GeneralRe: Go to finally in try block Pin
vanikanc30-Jan-13 7:42
membervanikanc30-Jan-13 7:42 
GeneralRe: Go to finally in try block Pin
jibesh30-Jan-13 7:44
memberjibesh30-Jan-13 7:44 
GeneralRe: Go to finally in try block Pin
devvvy31-Jan-13 15:44
memberdevvvy31-Jan-13 15:44 
AnswerRe: Go to finally in try block Pin
Eddy Vluggen30-Jan-13 7:45
mvpEddy Vluggen30-Jan-13 7:45 
AnswerRe: Go to finally in try block Pin
PIEBALDconsult30-Jan-13 7:53
memberPIEBALDconsult30-Jan-13 7:53 
AnswerRe: Go to finally in try block Pin
jschell30-Jan-13 8:04
memberjschell30-Jan-13 8:04 
AnswerRe: Go to finally in try block Pin
Abhinav S30-Jan-13 21:32
mvpAbhinav S30-Jan-13 21:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.150901.1 | Last Updated 2 Sep 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid