Click here to Skip to main content
15,919,479 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Exception information detail Pin
cstrader23215-Feb-08 6:32
cstrader23215-Feb-08 6:32 
GeneralRe: Exception information detail Pin
Luc Pattyn15-Feb-08 7:30
sitebuilderLuc Pattyn15-Feb-08 7:30 
GeneralRe: Exception information detail Pin
Luc Pattyn15-Feb-08 7:22
sitebuilderLuc Pattyn15-Feb-08 7:22 
GeneralRe: Exception information detail Pin
cstrader23215-Feb-08 7:45
cstrader23215-Feb-08 7:45 
GeneralRe: Exception information detail Pin
Luc Pattyn15-Feb-08 7:49
sitebuilderLuc Pattyn15-Feb-08 7:49 
GeneralRe: Exception information detail Pin
cstrader23215-Feb-08 10:15
cstrader23215-Feb-08 10:15 
GeneralRe: Exception information detail Pin
supercat918-Feb-08 6:16
supercat918-Feb-08 6:16 
GeneralRe: Exception information detail Pin
Luc Pattyn18-Feb-08 9:06
sitebuilderLuc Pattyn18-Feb-08 9:06 
Hi,

this is how I see it:

your plot class should define a number of exceptions for the cases 1 and 2 you listed;
that's the conditions that have a functional significance to the plot itself.
these exceptions become part of the contract between the user-defined function and the plot class.

your plot method should react appropriately to these exceptions; and it should also protect
itself against spurious exceptions, i.e. anything else the function might (but really
shouldn't) throw; these include your third group. Probably the protection would just entail
catching everything, and encapsulating it into a single PlotException, of course with the original exception as an inner one.

on the other hand the user-supplied function should contain its own exception handling,
it should catch things such as overflow, zero divide, etc. and either return whatever value
it considers appropriate, or (better) throw one of the exceptions your plot method has defined.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.


GeneralNET 1.1 SMTP problem : "The transport failed to connect to the server." [modified] Pin
Stortman15-Feb-08 4:07
Stortman15-Feb-08 4:07 
GeneralRe: NET 1.1 SMTP problem : "The transport failed to connect to the server." Pin
Dave Kreskowiak15-Feb-08 4:30
mveDave Kreskowiak15-Feb-08 4:30 
GeneralRe: NET 1.1 SMTP problem : "The transport failed to connect to the server." Pin
Stortman15-Feb-08 5:32
Stortman15-Feb-08 5:32 
GeneralRe: NET 1.1 SMTP problem : "The transport failed to connect to the server." Pin
Dave Kreskowiak15-Feb-08 5:49
mveDave Kreskowiak15-Feb-08 5:49 
GeneralRe: NET 1.1 SMTP problem : "The transport failed to connect to the server." Pin
Stortman15-Feb-08 11:06
Stortman15-Feb-08 11:06 
GeneralRe: NET 1.1 SMTP problem : "The transport failed to connect to the server." Pin
Stortman15-Feb-08 13:58
Stortman15-Feb-08 13:58 
GeneralOpening VS2005 Project in VS2008 Pin
plural15-Feb-08 3:11
plural15-Feb-08 3:11 
GeneralRe: Opening VS2005 Project in VS2008 Pin
Dave Kreskowiak15-Feb-08 4:26
mveDave Kreskowiak15-Feb-08 4:26 
GeneralRe: Opening VS2005 Project in VS2008 Pin
plural15-Feb-08 4:37
plural15-Feb-08 4:37 
QuestionTop most question? Pin
Benny_Lava15-Feb-08 2:35
Benny_Lava15-Feb-08 2:35 
GeneralRe: Top most question? Pin
Dave Kreskowiak15-Feb-08 4:23
mveDave Kreskowiak15-Feb-08 4:23 
GeneralRe: Top most question? Pin
Luc Pattyn15-Feb-08 6:08
sitebuilderLuc Pattyn15-Feb-08 6:08 
QuestionHardware interface from vb.net,c#,vb6. Pin
aamn115-Feb-08 2:18
aamn115-Feb-08 2:18 
GeneralRe: Hardware interface from vb.net,c#,vb6. Pin
Dave Kreskowiak15-Feb-08 4:15
mveDave Kreskowiak15-Feb-08 4:15 
General'UPGRADE_WARNING: Couldn't resolve default property of object Pin
sarat15-Feb-08 1:40
sarat15-Feb-08 1:40 
GeneralRe: 'UPGRADE_WARNING: Couldn't resolve default property of object Pin
Dave Kreskowiak15-Feb-08 4:10
mveDave Kreskowiak15-Feb-08 4:10 
QuestionPrinting from VB.Net Pin
Senthil_M15-Feb-08 1:34
Senthil_M15-Feb-08 1:34 

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.