Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Eiffel > Re: Modular Pro...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 12 Topic 876 of 913
Post > Topic >>

Re: Modular Protection vs Assertions ...

by llothar <llothar@[EMAIL PROTECTED] > Jul 29, 2007 at 04:24 AM

On 29 Jul., 15:08, Colin LeMahieu <clemah...@[EMAIL PROTECTED]
> wrote:
> Exceptions are used to handle cases where the failure result could not
> have been predicted beforehand.  A network communications failure
> cannot be tested for and you can only observe its occurrence once it
> has happened.

But a network error it is so often that you shouldn't use exceptions
here either. Don't use exceptions as another control flow (except if
you have serious reasons to do so).

> Contracts are used to reduce the domain and range of a function in to
> terms valid for that function.  A range constraint on the function
> is_even(source: INTEGER) would be result implies source \\ 2 = 0.  A

Sorry this is a result constraint and not a rande constraint.

But the main sentence in your posting is correct:

> Contracts should be fleshed out in debugging and testing.  Exceptions
> can occur during normal program execution and should be anticipated
> and able to recover but only used to recover from things that could
> not have been tested beforehand.




 12 Posts in Topic:
Modular Protection vs Assertions ...
bravegag <bravegag@[EM  2007-07-28 06:40:53 
Re: Modular Protection vs Assertions ...
Colin LeMahieu <clemah  2007-07-29 01:08:25 
Re: Modular Protection vs Assertions ...
llothar <llothar@[EMAI  2007-07-29 04:24:56 
Re: Modular Protection vs Assertions ...
Ulrich Windl <Ulrich.W  2007-07-31 08:59:00 
Re: Modular Protection vs Assertions ...
Ulrich Windl <Ulrich.W  2007-07-31 08:54:06 
Re: Modular Protection vs Assertions ...
llothar <llothar@[EMAI  2007-07-31 11:26:53 
Re: Modular Protection vs Assertions ...
bravegag <bravegag@[EM  2007-07-31 23:57:33 
Re: Modular Protection vs Assertions ...
bravegag <bravegag@[EM  2007-08-01 00:14:09 
Re: Modular Protection vs Assertions ...
Ulrich Windl <Ulrich.W  2007-08-02 10:47:43 
Re: Modular Protection vs Assertions ...
llothar <llothar@[EMAI  2007-08-01 01:39:38 
Re: Modular Protection vs Assertions ...
llothar <llothar@[EMAI  2007-08-01 01:42:00 
Re: Modular Protection vs Assertions ...
Colin LeMahieu <clemah  2007-08-01 07:27:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 10:51:46 CDT 2008.