Click here to Skip to main content
15,888,351 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Exception Tolerance Pin
Brady Kelly11-Apr-08 3:42
Brady Kelly11-Apr-08 3:42 
GeneralRe: Exception Tolerance Pin
Pete O'Hanlon11-Apr-08 4:33
mvePete O'Hanlon11-Apr-08 4:33 
GeneralRe: Exception Tolerance Pin
Brady Kelly11-Apr-08 4:59
Brady Kelly11-Apr-08 4:59 
GeneralRe: Exception Tolerance Pin
Pete O'Hanlon15-Apr-08 23:16
mvePete O'Hanlon15-Apr-08 23:16 
GeneralRe: Exception Tolerance Pin
PIEBALDconsult16-Apr-08 4:30
mvePIEBALDconsult16-Apr-08 4:30 
Questionhow to: Pass status information through tiers? Pin
theitmueller10-Apr-08 5:01
theitmueller10-Apr-08 5:01 
AnswerRe: how to: Pass status information through tiers? Pin
Luc Pattyn10-Apr-08 6:42
sitebuilderLuc Pattyn10-Apr-08 6:42 
AnswerRe: how to: Pass status information through tiers? Pin
Mark Churchill10-Apr-08 20:10
Mark Churchill10-Apr-08 20:10 
Theres nothing wrong with throwing an exception containing a list of business rule violations.

The "exceptions should not be used in normal program flow" is because exceptions take a non-trivial amount of time to throw. This rule refers to constructs like so:

while(i++)
{
  // do something
  if(i>10) throw;
}


If an action is occuring, and a business rule is broken such that the action can't proceed, then an exception is ideal to signal this. It backs up through the call stack, letting every catch/finally block perform its tasks, and effectively backs cleanly out of the action.

A benefit of exceptions is that its difficult to ignore them without explicitly 'eating' them. I've seen several bugs due to people ignoring return codes (usually with crappy code-generated data layers with bool businessObject.Save() - and people ignoring the return code).


AnswerRe: how to: Pass status information through tiers? Pin
Member 9611-Apr-08 8:43
Member 9611-Apr-08 8:43 
AnswerRe: how to: Pass status information through tiers? Pin
Member 247162112-Apr-08 1:00
Member 247162112-Apr-08 1:00 
AnswerRe: how to: Pass status information through tiers? Pin
stavinski12-Apr-08 11:55
stavinski12-Apr-08 11:55 
AnswerRe: how to: Pass status information through tiers? Pin
Oakman17-Apr-08 14:10
Oakman17-Apr-08 14:10 
QuestionBest Design approach - thoughts; ideas; comments Pin
JoeContreras10-Apr-08 3:16
JoeContreras10-Apr-08 3:16 
GeneralRe: Best Design approach - thoughts; ideas; comments Pin
Pete O'Hanlon10-Apr-08 3:27
mvePete O'Hanlon10-Apr-08 3:27 
GeneralRe: Best Design approach - thoughts; ideas; comments Pin
Member 9611-Apr-08 8:52
Member 9611-Apr-08 8:52 
QuestionDesign Methods ?? Pin
Julia4u9-Apr-08 11:52
Julia4u9-Apr-08 11:52 
AnswerRe: Design Methods ?? Pin
Pete O'Hanlon9-Apr-08 11:58
mvePete O'Hanlon9-Apr-08 11:58 
General[Message Deleted] Pin
Julia4u9-Apr-08 12:05
Julia4u9-Apr-08 12:05 
GeneralRe: Design Methods ?? Pin
Julia4u9-Apr-08 12:06
Julia4u9-Apr-08 12:06 
AnswerRe: Design Methods ?? Pin
Ravi Bhavnani9-Apr-08 12:03
professionalRavi Bhavnani9-Apr-08 12:03 
Answeris this forum dead? Pin
Luc Pattyn9-Apr-08 12:08
sitebuilderLuc Pattyn9-Apr-08 12:08 
AnswerRe: Design Methods ?? Pin
Julia4u9-Apr-08 16:02
Julia4u9-Apr-08 16:02 
GeneralRe: Design Methods ?? Pin
Shog99-Apr-08 16:31
sitebuilderShog99-Apr-08 16:31 
GeneralRe: Design Methods ?? Pin
Julia4u9-Apr-08 16:49
Julia4u9-Apr-08 16:49 
GeneralRe: Design Methods ?? Pin
Pete O'Hanlon9-Apr-08 21:41
mvePete O'Hanlon9-Apr-08 21:41 

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.