Strategies to avoid error
-
3 approaches
-
Organize software to minimize errors
-
Eliminate most of the errors we made through debugging and testing
-
make user the remaining errors are not serious
Types of exeptions
-
-
- ie negative numbers in dates and shit
- letters in numbers
- floats in int aerea
-
Program errors
-
Complie time errors
-
syntax errors
- violation of just general syntax
-
link time errors
-
run time errors
-
program crash
-
exceptions
-
Detecetd by user code
-
logic errors
How to report an error
-
you can output a number
- it can corespond to an error
- it can just say error
-
Throwing an exception
-
when an exception occurs you stop the running code and go into exception processing to handle the code
-
you can have more than 1 exception (prob on midterm)