Error codes
Every problem that Check or Run reports has a code, a line and column, and a sentence that says what is wrong.
Next step says what kind of action a problem needs: fix the script; try again later (nothing in the script is wrong); act in the app first, such as leaving animation mode; or report it (a fault in Molkit, not in the script).
| Code | Meaning | Next step | Fix |
|---|---|---|---|
E-SYNTAX |
The line cannot be read as Molkit Script, or a value has the wrong form. | Fix the script | Rewrite the line in the form the command reference shows. |
E-PCT |
% was used to start a comment. |
Fix the script | Start comments with #. |
E-VERB |
There is no command with that name. | Fix the script | Use a command from the command reference (the error lists the nearest ones). |
E-OPT |
An option the command does not have, a value the option does not take, or options that cannot be used together. | Fix the script | Use the options and values that the command reference lists for that command. |
E-NAME |
A name that does not exist, or a name that a new object cannot have. | Fix the script | Use a name that describe lists, or give the new object another name with name:. |
E-TAKEN |
The name is already used in the document. | Fix the script | Give the new object another name (name: water-2), or, on draw, add if-exists: reuse. |
E-AMBIG |
The script could mean more than one thing (two sets with the same name, or a formula that several species share). | Fix the script | Say which one you mean, as the error suggests. |
E-OBJECT |
The command does not work on that kind of object, or the object is no longer one molecule. | Fix the script | Name a molecule (or the kind of object the command takes). |
E-PART |
A part (water.O, water.H1, water.bond(O, H1), water.O.lone-pair1) that the molecule does not have, or one written in a form Molkit cannot read. |
Fix the script | Use a part that the error lists (describe <molecule> lists them all). |
E-BOND |
A bond named by its elements (bond(C, H)) matches more than one bond. |
Fix the script | Number the atoms: bond(C1, H2) (describe <molecule> lists its bonds). |
E-APPLY |
The request does not apply to that molecule (a view it cannot have, or a view it already is). | Fix the script | Leave that view out, or use views: all to make only the views that apply. |
E-DERIVE |
Molkit could not make the requested view or picture of that molecule. | Fix the script | Leave it out, or draw the molecule another way. |
E-DRAW |
Molkit could not lay out that species. | Fix the script | Try the other view, or give the species with smiles:. |
E-SMILES |
Molkit cannot read the SMILES. | Fix the script | Correct the SMILES (close every ring; remove control characters). |
E-WRITE |
MathJax could not typeset or measure the text or equation. | Try again | Try again once MathJax has loaded, and check that the \ce{...} or $...$ is well formed. |
E-EXPORT |
Molkit could not export that object. | Report it | Report it. Meanwhile, export the object from the app. |
E-NETWORK |
A lookup (PubChem, or the Crystallography Open Database) could not be reached. | Try again | Give the species with smiles: (a crystal: open its CIF with File > Open), or try again when you are online. |
E-PROTO |
The script uses a reserved command, option or value that Molkit Script does not run. | Fix the script | Leave it out: the command reference lists only what works. |
E-LIMIT |
The run went past a limit (lines carried out, recipe depth, or nesting). | Fix the script | Look for a loop or recipe that never ends, then shorten or restructure it. |
E-MODE |
Scripts cannot run in the app’s current state (animation mode, inside an entered group, or on another tab while stepping). | Act in the app | Leave animation mode or the group, then run again. |
E-BUSY |
Another script is running. | Try again | Wait for it to finish, or stop it, then run again. |
E-STOP |
You stopped the run, and it was undone. | Act in the app | Run the script again when you are ready. |
E-INTERNAL |
Molkit failed while running a line (a fault in Molkit, not in the script). | Report it | Report it with the script. The run was undone. |
E-OCTET |
The species has two depictions (obeying the octet, or expanded). | Fix the script | Add octet: obey or octet: expand. |
A run that fails changes nothing: the whole run is undone. With on-error: skip on a foreach, a failing item is undone and skipped, and the run goes on.