Preconditions
- Excessive error checking is costly
- Returning dummy values can complicate testing
- Contract metaphor
-
- Service provider must specify preconditions
- If precondition is fulfilled, service provider must work
correctly
- Otherwise, service provider can do anything
- When precondition fails, service provider may
-
- throw exception
- return false answer
- corrupt data
previous |
start |
next .... [Slide 40] ....