2.1.6

Runtime Error

Test yourself

Runtime Errors

Runtime errors are the trickiest of the three types of errors because they are not always found during development. Software users may first encounter runtime errors.

Illustrative background for Runtime errorsIllustrative background for Runtime errors ?? "content

Runtime errors

  • Runtime errors are errors that happen while the program is running.
  • Runtime errors cannot be found during translation.
  • These errors can only be detected while a program is running.
  • The chance of experiencing a runtime error can be reduced through testing.
Illustrative background for Examples of runtime errorsIllustrative background for Examples of runtime errors ?? "content

Examples of runtime errors

  • Bad inputs that throw an unhandled exception.
  • Receiving unexpected or corrupted data.
  • Running out of memory.

Logic Errors

Logic errors are hard to detect because the translator will not detect them for us.

Illustrative background for Logic errorsIllustrative background for Logic errors ?? "content

Logic errors

  • Logic errors are mistakes in the logic of the program.
  • Programs will run, but their outcome will not be as intended.
  • Logic errors are much more difficult to debug than syntax errors.
Illustrative background for Syntax errorsIllustrative background for Syntax errors ?? "content

Syntax errors

  • Syntax errors are mistakes in the grammar of a language.
  • The program will not run if it contains syntax errors.
Illustrative background for Runtime errorsIllustrative background for Runtime errors ?? "content

Runtime errors

  • Runtime errors arise while a program is running.
  • Runtime errors cannot be detected by the translator.

Jump to other topics

1Problem Solving

2Programming

3Data

4Computers

5Communication & The Internet

6The Bigger Picture

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium