CompileErrors

From Compost Wiki
Revision as of 20:34, 8 January 2015 by Danielr (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

When you build a post in Compost4, the compiler will report any errors or inconsistencies so that you can fix them before encountering problems in GibbsCAM.

There are five types of errors:

  • Syntax Errors are issued for code which violates the fundamental grammar rules of the Compost language.
  • Programming Errors are issued for code which is syntactically correct but will not work correctly, or which is internally inconsistent.
  • Internal Errors are issued when the compiler is confused or encounters a bug.
  • Warnings are issued for code which will execute, but may have unexpected results.
  • Informational Messages provide information which does not impact the execution of the post, but may be interesting to you.

In addition to the type, each error provides a code, a message, and an offset.

The code is used to look the error up here, on the wiki. It may also be processed by scripts and plugins. It consists of two parts; a single letter prefix, and a four digit number. The prefix is one of the following:

  • A indicates that the error was issued from the Argument Tree. This is the syntactic analyzer for Compost. The Argument Tree is run not only for the compiler, but also for many internal functions in the Compost editor, so errors with this prefix may cause problems elsewhere in Compost.
  • C indicates that the error was issued from the compiler itself.
  • E indicates that the error was issued by the PST Export tool.
  • P indicates an error issued by the Python interpreter. Normally these errors will appear only when editing Python scripts.
  • S indicates that the error was issued by a compile-time semantic check script provided by Gibbs Development.
  • X is a prefix reserved for plugin and script authors to use for their own error checking scripts.

The message is a brief description of the error, including relevant context. For details beyond the message, you can right-click the error in the log and click "Help on Error."

The offset is the location in the file where the error occurred. Double-clicking the error will jump to this offset in the editor.

For a list of documented compiler errors, please see Category:Compiler Errors