Please enable JavaScript.
Coggle requires JavaScript to display documents.
3 Types of Errors (Syntax Error (Examples (Passing incorrect/insufficient…
3 Types of Errors
Syntax Error
.
Usually detected during development.
Program will not be compiled.
Code does not follow the rules of the programming language.
Examples
Passing incorrect/insufficient parameters.
Missing parts of multi-line statements.
Incorrect spelling of variable names.
Data-type mismatch.
Using Variables without declaring them.
Missing/extra brackets.
Logic Error
.
The code doesn't do what it is supposed to.
Will usually run normally but with some unexpected results.
Usually detected while testing.
May sometimes cause a run-in error.
The syntax of the code is correct.
Examples
Misplaced brackets.
Instructions written (and therefore executed) in the wrong place.
Incorrect mathematical formulae.
Incorrect conditions provided for Loops/Selection Statements.
Run-Time Error
.
Causes program to crash at runtime.
Usually detected while testing.
The program attempts an impossible operation.
Examples
Attempt to reference array elements before they are initialised.
Calculating √ of a negative number.
Attempt to access nonexistent file.
Overflow error - result of calculation is a number that is too large.
Division by Zero.