Re: When to create your own exception class?
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Tue, 28 Jun 2005 17:55:18 +0100
Carlos J. Quintero [.NET MVP] <carlosq@xxxxxxxxxxxxxxxxxxx> wrote:
> The actual point about exceptions is that they should:
>
> - Provide a friendly message to the user in non-technical terms about what
> happened, why and most important, how to recover from it
I'm not at all convinced about that one. Chances are, the exception is
dealing with some concept that the user has *no* clue about. For
instance, say a parameter is null when it shouldn't be - how can you
explain that in non-technical terms? How many users are going to have
the faintest idea what null is?
In my experience, you need something at a much higher level to tell the
user that something has gone wrong. The message displayed may depend on
the exception generated, but it's unlikely to be known by the exception
itself.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: When to create your own exception class?
- From: Ignacio Machin \( .NET/ C# MVP \)
- Re: When to create your own exception class?
- From: Carlos J. Quintero [.NET MVP]
- Re: When to create your own exception class?
- References:
- When to create your own exception class?
- From: Allan Ebdrup
- Re: When to create your own exception class?
- From: Carlos J. Quintero [.NET MVP]
- When to create your own exception class?
- Prev by Date: Re: Setting a property by reflection, with implicit conversion
- Next by Date: Re: How can I set my form to be maximal size for the screen?
- Previous by thread: Re: When to create your own exception class?
- Next by thread: Re: When to create your own exception class?
- Index(es):
Relevant Pages
|