Click here to Skip to main content
15,890,882 members
Home / Discussions / C#
   

C#

 
GeneralRe: Exception Handling / Response Question Pin
PIEBALDconsult20-Jun-14 7:44
mvePIEBALDconsult20-Jun-14 7:44 
GeneralRe: Exception Handling / Response Question Pin
Kevin Marois20-Jun-14 7:52
professionalKevin Marois20-Jun-14 7:52 
GeneralRe: Exception Handling / Response Question Pin
PIEBALDconsult20-Jun-14 8:05
mvePIEBALDconsult20-Jun-14 8:05 
AnswerRe: Exception Handling / Response Question Pin
Eddy Vluggen20-Jun-14 8:05
professionalEddy Vluggen20-Jun-14 8:05 
GeneralRe: Exception Handling / Response Question Pin
Kevin Marois20-Jun-14 8:18
professionalKevin Marois20-Jun-14 8:18 
GeneralRe: Exception Handling / Response Question Pin
Eddy Vluggen20-Jun-14 9:21
professionalEddy Vluggen20-Jun-14 9:21 
GeneralRe: Exception Handling / Response Question Pin
Kevin Marois20-Jun-14 10:22
professionalKevin Marois20-Jun-14 10:22 
GeneralRe: Exception Handling / Response Question Pin
Eddy Vluggen20-Jun-14 11:05
professionalEddy Vluggen20-Jun-14 11:05 
Kevin Marois wrote:
You're confusing a Business Rule Violation with an Exception.
No, I just want to force the caller to handle the violation.


Kevin Marois wrote:
What is an exception? It's simply a fancy word for Error. A BR violation isn't
an error. It's a condition that can't be allowed to continue on to the DAL.
It's a condition that needs handling outside of the conventional expected routine, which is to 'crud' something.


Kevin Marois wrote:
And to say "There technically cannot be "duplicate" records in a relational
database" isn't always true. Again, this is something determined by the app
requirements.
Codd[^] says no. It's determined by the abstraction. The DAL is there so BO doesn't have to worry about these details; if it is a BR, it will be implemented (often at multiple levels), and if possible, handled.

Think of the not-null constraint. It'll be checked in the browser, to save a trip to the server. It'll be checked on the server, to prevent accidents. It'll be checked again in the database, tripping the WinForm/WPF guy/gal.

Kevin Marois wrote:
My point in all this is that I think I've come up with a standardized way of
returning to the call ANYTHING that happens
Just be sure to check the return-code and not simply ignore it Smile | :)
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

QuestionPass specific object to a method expecting ref object parameter? Pin
arnold_w20-Jun-14 3:24
arnold_w20-Jun-14 3:24 
AnswerRe: Pass specific object to a method expecting ref object parameter? Pin
Richard Deeming20-Jun-14 3:58
mveRichard Deeming20-Jun-14 3:58 
GeneralRe: Pass specific object to a method expecting ref object parameter? Pin
OriginalGriff20-Jun-14 3:59
mveOriginalGriff20-Jun-14 3:59 
GeneralRe: Pass specific object to a method expecting ref object parameter? Pin
Richard Deeming20-Jun-14 4:01
mveRichard Deeming20-Jun-14 4:01 
AnswerRe: Pass specific object to a method expecting ref object parameter? Pin
OriginalGriff20-Jun-14 3:59
mveOriginalGriff20-Jun-14 3:59 
AnswerRe: Pass specific object to a method expecting ref object parameter? Pin
PIEBALDconsult20-Jun-14 7:41
mvePIEBALDconsult20-Jun-14 7:41 
AnswerRe: Pass specific object to a method expecting ref object parameter? Pin
Eddy Vluggen20-Jun-14 8:47
professionalEddy Vluggen20-Jun-14 8:47 
Questionwhen using Stored Procedure called from C# ? Pin
Member 245846719-Jun-14 21:46
Member 245846719-Jun-14 21:46 
AnswerRe: when using Stored Procedure called from C# ? Pin
OriginalGriff19-Jun-14 22:21
mveOriginalGriff19-Jun-14 22:21 
GeneralRe: when using Stored Procedure called from C# ? Pin
Member 245846720-Jun-14 22:58
Member 245846720-Jun-14 22:58 
GeneralRe: when using Stored Procedure called from C# ? Pin
OriginalGriff20-Jun-14 23:22
mveOriginalGriff20-Jun-14 23:22 
GeneralRe: when using Stored Procedure called from C# ? Pin
Member 245846720-Jun-14 23:41
Member 245846720-Jun-14 23:41 
GeneralRe: when using Stored Procedure called from C# ? Pin
OriginalGriff21-Jun-14 0:06
mveOriginalGriff21-Jun-14 0:06 
GeneralRe: when using Stored Procedure called from C# ? Pin
Member 245846721-Jun-14 13:49
Member 245846721-Jun-14 13:49 
GeneralRe: when using Stored Procedure called from C# ? Pin
OriginalGriff21-Jun-14 19:43
mveOriginalGriff21-Jun-14 19:43 
GeneralRe: when using Stored Procedure called from C# ? Pin
Member 245846722-Jun-14 18:05
Member 245846722-Jun-14 18:05 
GeneralRe: when using Stored Procedure called from C# ? Pin
OriginalGriff22-Jun-14 18:48
mveOriginalGriff22-Jun-14 18:48 

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.