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

.NET (Core and Framework)

 
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 
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 
Patrick Skelton wrote:
According to some books I have read, the exceptions built into .NET should generally be reserved for .NET's own use


If that was the case, why the hell are those classes public? I have never read anything like that.

You should be creating custom exceptions only when your code interacts with something external. For instance, a service should return custom exceptions back to client in order to hide the complete information of the actual exception. Not because you are ashamed of it but it doesn't makes sense client knowing details of services. Same logic I use in case anything wrong happens in database. Apart from my data layer code, none of the layers get the complete trace of the error.

Apart from all the custom exceptions, I also keep one catch block taking in Exception as a type (in the outermost code layer) just in case we get an exception which I have not handled properly.
"Your code will never work, Luc's always will.", Richard MacCutchan[^]

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 
AnswerRe: Is it Possible to build a Processor which understands MSIL code. Pin
Member 725873413-Jan-11 1:48
Member 725873413-Jan-11 1:48 
GeneralRe: Is it Possible to build a Processor which understands MSIL code. Pin
vytheese13-Jan-11 2:27
professionalvytheese13-Jan-11 2:27 
AnswerRe: Is it Possible to build a Processor which understands MSIL code. Pin
Dave Kreskowiak13-Jan-11 3:44
mveDave Kreskowiak13-Jan-11 3:44 
GeneralRe: Is it Possible to build a Processor which understands MSIL code. Pin
Kirk Wood15-Jan-11 2:03
Kirk Wood15-Jan-11 2:03 

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.