Contracts + Assert
BCS
BCS at pathlink.com
Wed Oct 31 13:33:13 PDT 2007
Mike Linford wrote:
> So in what cases would one prefer to use contracts over normal exception handling?
>
> Ary Borenszweig Wrote:
>
>
the rule I use is use assert when you are checking something that should
not happen (e.i. If this happens there *is* a coding error) use throw
for things that might happen if something external is wrong (e.i. bad
user input, no Internet connection, out of disk space, bad file name etc.)
More information about the Digitalmars-d-learn
mailing list