Error handling
Contents
Error handling#
Error types:
Syntax errors
Logic errors
Runtime errors
Syntax errors#
// This code won't run at all X ← 42 Y ← 42 IF X = Y OUTPUT "Success!!" ENDIF
Logic errors#
// This code won't run at all
X ← 206
Y ← 42
IF X < Y
THEN
OUTPUT X, " is greater than ", Y
ENDIF
Runtime errors#
// This code will fail when run X ← 42 Y ← 0 OUTPUT X / Y
Finding your mistake#
Reread your code
Check the documentation
Search the internet
Take a break
Ask someone for help