Execution error

From Higher Computing Science
Jump to: navigation, search

This article is unfinished. Please consider joining and adding to this article. Read about Page layout beforehand.

Key points

  • An execution error is an error that is caused by the code when it runs. This would include an array being accessed at a position that doesn’t exist, a number being outside the possible range of numbers stored in the programming language, or dividing by zero.
  • A division by zero is an execution error where the computer tried to divide one number by zero, resulting in a crash.
  • Truncation is an execution error where, due to the way the program has been written, a number becomes less precise, leading to errors in a calculation.
  • An out of bounds error is an execution error that happens when an array is accessed in a position that does not exist, e.g. requesting position 20 of an array of ten numbers.
  • When handling files, if you try to access a file with an incorrect path, this will cause an Execution error.



Further information

Test yourself

Teaching resources