Click here to Skip to main content
15,890,609 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: When to Define a Custom Exception Pin
#realJSOP14-Jan-11 3:38
mve#realJSOP14-Jan-11 3:38 
GeneralRe: When to Define a Custom Exception Pin
Yusuf14-Jan-11 4:28
Yusuf14-Jan-11 4:28 
GeneralRe: When to Define a Custom Exception Pin
Eddy Vluggen14-Jan-11 11:54
professionalEddy Vluggen14-Jan-11 11:54 
GeneralRe: When to Define a Custom Exception Pin
Daniel Turini15-Jan-11 23:28
Daniel Turini15-Jan-11 23:28 
AnswerRe: When to Define a Custom Exception Pin
Single Step Debugger14-Jan-11 3:14
Single Step Debugger14-Jan-11 3:14 
AnswerRe: When to Define a Custom Exception Pin
HimanshuJoshi14-Jan-11 4:39
HimanshuJoshi14-Jan-11 4:39 
AnswerRe: When to Define a Custom Exception Pin
Ray Cassick14-Jan-11 6:24
Ray Cassick14-Jan-11 6:24 
AnswerRe: When to Define a Custom Exception Pin
Patrick Fox14-Jan-11 6:50
Patrick Fox14-Jan-11 6:50 
I think you would do this when you want to specify additional information beyond a string message describing what went wrong. Some exceptions take advantage of their name to provide additional information, like NullReferenceException. If one is thrown, clearly something is null and the code didn't expect it to be. SqlException contains additional properties related to line numbers in stored procedures that failed, for example.

So, if you'd like to provide additional properties to describe what went wrong, create a class that inherits Exception that has those properties.
AnswerRe: When to Define a Custom Exception Pin
RobCroll14-Jan-11 21:21
RobCroll14-Jan-11 21:21 
AnswerRe: When to Define a Custom Exception Pin
Patrick Skelton14-Jan-11 22:39
Patrick Skelton14-Jan-11 22:39 
GeneralRe: When to Define a Custom Exception Pin
Pete O'Hanlon15-Jan-11 4:20
mvePete O'Hanlon15-Jan-11 4:20 
AnswerRe: When to Define a Custom Exception Pin
dan!sh 15-Jan-11 2:35
professional dan!sh 15-Jan-11 2:35 
AnswerRe: When to Define a Custom Exception Pin
Robert Tanenbaum28-Jan-11 4:20
Robert Tanenbaum28-Jan-11 4:20 
GeneralRe: When to Define a Custom Exception Pin
Patrick Skelton28-Jan-11 6:00
Patrick Skelton28-Jan-11 6:00 
QuestionIs it Possible to build a Processor which understands MSIL code. PinPopular
vytheese13-Jan-11 0:46
professionalvytheese13-Jan-11 0:46 
AnswerRe: Is it Possible to build a Processor which understands MSIL code. Pin
Pete O'Hanlon13-Jan-11 0:51
mvePete O'Hanlon13-Jan-11 0:51 
GeneralRe: Is it Possible to build a Processor which understands MSIL code. Pin
vytheese13-Jan-11 0:59
professionalvytheese13-Jan-11 0:59 
GeneralRe: Is it Possible to build a Processor which understands MSIL code. Pin
Pete O'Hanlon13-Jan-11 1:02
mvePete O'Hanlon13-Jan-11 1:02 
GeneralRe: Is it Possible to build a Processor which understands MSIL code. Pin
vytheese13-Jan-11 1:12
professionalvytheese13-Jan-11 1:12 
GeneralRe: Is it Possible to build a Processor which understands MSIL code. Pin
Rob Grainger13-Jan-11 22:38
Rob Grainger13-Jan-11 22:38 
GeneralRe: Is it Possible to build a Processor which understands MSIL code. Pin
Wesley Harris16-Jan-11 22:16
Wesley Harris16-Jan-11 22:16 
GeneralRe: Is it Possible to build a Processor which understands MSIL code. Pin
peterchen14-Jan-11 1:57
peterchen14-Jan-11 1:57 
AnswerRe: Is it Possible to build a Processor which understands MSIL code. Pin
Luc Pattyn13-Jan-11 1:43
sitebuilderLuc Pattyn13-Jan-11 1:43 
GeneralRe: Is it Possible to build a Processor which understands MSIL code. Pin
vytheese13-Jan-11 2:25
professionalvytheese13-Jan-11 2:25 
GeneralRe: Is it Possible to build a Processor which understands MSIL code. Pin
Luc Pattyn13-Jan-11 2:40
sitebuilderLuc Pattyn13-Jan-11 2:40 

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.