...

/

enforce and the Use of assert-enforce

enforce and the Use of assert-enforce

This lesson explains the use of enforce statements and assert in D language.

We'll cover the following...

enforce for throwing exceptions #

Not every unexpected situation is an indication of a program error. Programs may also experience unexpected inputs and unexpected environmental states. For example, the data that is entered by the user should not be validated by an assert check because invalid data has nothing to do with the correctness of the ...