Skip to content

Error Messages

MICROWAVE edited this page Aug 27, 2019 · 4 revisions

Error messages

Trust me, you are gonna see lots of error messages while coding. This wiki page will help you to debug your program if you are confused and don't know how to deal with the said error.

1. Different type of errors

  • !ERROR Those error with a ! at the beginning means it come from the engine. That means you typed an unexisting command or you didn't typed the right syntax. (see Chapter 2)
  • !!ERROR Errors with two ! means that the error come from the interpreter (see Chapter 2)
  • [fileman.cpp] Error! The error come from the file managing system. See chapter 3
  • [stringop.cpp] Error The error come from the math expression system. See chapter 4
  • [stringadd.cpp] Error The error come from the string expression system. See chapter 4
  • [stringcomp.cpp] Error The error come from the condition expression system. see chapter 4

2. !ERROR and !!ERROR type - Interpreter and Engine errors

2.1. !ERROR type

Those errors come from the interpretation engine. (engine.cpp)

  • !SYNTAX ERROR This happens when you wrote an instruction wrong. You may have mispelled it or the instruction is spelt right but the syntax of it is wrong.
  • !PROGRAM ERROR It happens when you attempt using the G instruction directly into the interpreter.
  • !STOP AT <line> The running program stopped at the said line because of an error coming from an instruction.
  • !INPUT ERROR It happens if you write something else than a number when the ?* instruction prompts you a number.

2.2. !!ERROR type

The errors come directly from the interpreter (main.cpp)

  • !!SYNTAX ERROR You typed an interpreter command wrong. (only happens in SAVE and LOAD)

3. [fileman.cpp] Error type - File managing system errors

When a file can't be read/written, fileman.cpp will output an error.

3.1. When saving a file

  • File Error! <file> couldn't be deleted/overwritten. Check if the file is currently used by another program or the drive where it's stored is in read-only.
  • <file> exists! Program couldn't be saved. Will never happen, it happens when the overwrite variable in saveFile is on false. (when you save a file, the overwrite variable is on true)
  • File Error! Unable to open file. fileman.cpp couldn't simply open the file.

3.2. When loading a file

  • File Error! <file> doesn't exist. The file you attempted to load doesn't exist.

4. [string*.cpp] Error type - Expression errors

4.1. stringop.cpp

When stringop.cpp shows an error, it will return 0 but the program will continue.

  • Syntax Errors
    • Pointer out of range. This happen when you put too many operators in one expression.
    • Misplaced operator/variable. That means you misplaced an operator/variable.
    • Invalid system variable This is what that happens when you attempt using a non-existent system varible/modifier (see more in Variables/Modifiers)
    • Unknown Character You inserted a foreign character that has nothing to do in the expression.

4.2. stringadd.cpp

When stringadd.cpp shows an error, it will return "!ERR" but the program will continue.

  • Syntax Errors
    • Misplaced quote/variable/operator. You misplaced a quote/varible/operator/modifier (misplaced variable also counts as modifier.)
    • Unknown Character You inserted a foreign character that has nothing to do in the expression.
    • wip.