Error Handling Flashcards
What is data validation
carried out by a computer automatically when data is input; it ensures data is reasonable, sensible and within acceptable limits
What are all the vlaidation checks
Pressence check
Range check
Length check
Type check
Format check
What is a presence check
used to ensure user hasn’t lefta value or field blank
What is a range check
Ensure that the data entered is in the correct range
Makes use of upper and lower boundaries
What is a length check
Used to ensure entered data doesn’t exceed or isn’t shorter than a particular number of characters
What is a type check
used to ensure that the data entered is of the correct data type
What is a format check
used to ensure that data entered is in correct format
data must conform to a pattern
What is a syntaxt error and how does it occur
Error in the code entered into the code editor e.g. mispelling or omission of a symbol
What is an execution/run-time errors
Detected during program execution and will cause program to crash.
dividing by zero will cause this error
What is a logic error
Arise in programs that compile and run without error. output produced by program doesn’t match the expected output.
What is the two error-trapping techniques
Debugging
Expection/error handling
What is debugging
Process of detecting and correct or removing errors from code. may involve use of debug feature of programming language
What is exception/error handling
Process where a program will attempt to deal with an error generated at run time so that program doesn’t crash