Click here to Skip to main content
15,077,137 members
Home / Discussions / C#
   

C#

 
Questionoverriding members? Pin
NaNg1524111-Apr-07 22:20
MemberNaNg1524111-Apr-07 22:20 
AnswerRe: overriding members? Pin
Mazdak11-Apr-07 22:36
MemberMazdak11-Apr-07 22:36 
GeneralRe: overriding members? Pin
NaNg1524112-Apr-07 0:56
MemberNaNg1524112-Apr-07 0:56 
QuestionKeyboard Spy Pin
Saikek11-Apr-07 22:11
MemberSaikek11-Apr-07 22:11 
AnswerRe: Keyboard Spy Pin
Ollie198611-Apr-07 22:18
MemberOllie198611-Apr-07 22:18 
AnswerRe: Keyboard Spy Pin
Martin#11-Apr-07 22:22
MemberMartin#11-Apr-07 22:22 
QuestionCodeKeep plugin Pin
Saikek11-Apr-07 22:09
MemberSaikek11-Apr-07 22:09 
Questiontry catch (re)throw problem... Pin
Super Lloyd11-Apr-07 21:28
MemberSuper Lloyd11-Apr-07 21:28 
I have an object where I do 'special' cleanup in case of exception
my code is somewhat like that:

void Method()
{
try
{
Something();
}
catch
{
SpecialCleanup();
throw;
}
finally
{
NormalCleanUp();
}
}

my problem is that when an exception is thrown VS break into the catch clause and I have no idea what causes the exception.

I also tried
catch(Exception ex)
{
SpecialCleanup();
throw ex;
}

but the ex.StackTrace is reinitialized and I have no idea of the problem!
any tips on how to to be able to debug that?

for now I wrote:
#if !DEBUG
catch
{
SpecialCleanup();
throw;
}
#endif

but I would like to catch meaningful stack trace at runtime as well....
AnswerRe: try catch (re)throw problem... Pin
Jaiprakash M Bankolli11-Apr-07 21:34
MemberJaiprakash M Bankolli11-Apr-07 21:34 
AnswerRe: try catch (re)throw problem... Pin
Stevo Z11-Apr-07 21:44
MemberStevo Z11-Apr-07 21:44 
AnswerRe: try catch (re)throw problem... Pin
Scott Dorman12-Apr-07 3:04
professionalScott Dorman12-Apr-07 3:04 
GeneralRe: try catch (re)throw problem... Pin
Super Lloyd12-Apr-07 4:05
MemberSuper Lloyd12-Apr-07 4:05 
AnswerRe: try catch (re)throw problem... Pin
Vega0212-Apr-07 21:04
MemberVega0212-Apr-07 21:04 
Questionwhich tools we need when building games ? Pin
kkun11-Apr-07 21:16
Memberkkun11-Apr-07 21:16 
QuestionDVD File Reader Pin
apostleofzion111-Apr-07 21:14
Memberapostleofzion111-Apr-07 21:14 
Questionxml File name error [modified] Pin
7111-Apr-07 21:04
Member7111-Apr-07 21:04 
AnswerRe: xml File name error Pin
Jaiprakash M Bankolli11-Apr-07 21:29
MemberJaiprakash M Bankolli11-Apr-07 21:29 
GeneralRe: xml File name error Pin
7111-Apr-07 22:37
Member7111-Apr-07 22:37 
GeneralRe: xml File name error Pin
Jaiprakash M Bankolli12-Apr-07 0:23
MemberJaiprakash M Bankolli12-Apr-07 0:23 
GeneralRe: xml File name error Pin
7112-Apr-07 0:38
Member7112-Apr-07 0:38 
QuestionAdding user defined compiler Error Pin
SakthiSurya11-Apr-07 20:13
MemberSakthiSurya11-Apr-07 20:13 
AnswerRe: Adding user defined compiler Error Pin
Jaiprakash M Bankolli12-Apr-07 0:41
MemberJaiprakash M Bankolli12-Apr-07 0:41 
QuestionSentinel Loop Question Pin
JMOdom11-Apr-07 19:20
MemberJMOdom11-Apr-07 19:20 
AnswerRe: Sentinel Loop Question Pin
JMOdom12-Apr-07 5:19
MemberJMOdom12-Apr-07 5:19 
QuestionWhy Main? Pin
Saranya B11-Apr-07 19:19
MemberSaranya B11-Apr-07 19:19 

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

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