Click here to Skip to main content
15,028,757 members
Home / Discussions / C#
   

C#

 
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 
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 
You are running in to a problem known as "breaking the stack", which is why the exception doesn't have the relevant stack trace data. You were on the right track, but need to change the code so it looks like this:

catch(Exception ex)
{
    SpecialCleanup();
    throw;
}
The difference here is that throw ex; throws a new exception where throw; re-throws the original exception.

That being said, you really should try to avoid catching general exceptions and catch specific exceptions that you know you can recover from. What is the difference between SpecialCleanup and NormalCleanup?

-----------------------------
In just two days, tomorrow will be yesterday.

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 
AnswerRe: Why Main? Pin
CPallini11-Apr-07 20:49
mveCPallini11-Apr-07 20:49 
AnswerRe: Why Main? Pin
kkun11-Apr-07 21:25
Memberkkun11-Apr-07 21:25 
AnswerRe: Why Main? Pin
Jaiprakash M Bankolli11-Apr-07 21:45
MemberJaiprakash M Bankolli11-Apr-07 21:45 

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.