Typical failures you will see from the interpreter, and what usually causes them. For structured handling in SPL, see Errors & exceptions.
math.div with second argument
zero. Catch with
error.except(error.DivisionByZeroError).
list.get,
string.getChar,
tuple.get, etc.).
file.readline,
file.write, or
file.append failed (missing
file, permission, or other OS error). Paths must stay under the
working directory (no ..).
print.number rejects bools;
print.string requires a real
string. Fix the expression or convert first.
test.break (or
test.continue) only works
inside test.forLoop or
test.while, not inside a bare
function body unless that
call is nested in a loop.
function.name was called but no
functionDefine.name exists in
this interpreter run (typo, or define after use without
use loading the file first).
functionDefine parameter list.
test.forLoop and
test.while cap iterations
(100,000). Usually an infinite or overly long loop.
end;,
unclosed block, or malformed
use path. The message includes
a line number.
error.try(): must be followed
immediately (next statements) by one or more
error.except(...): blocks.
Otherwise the standalone
error.try block raises at
runtime.
function.call must be a value
produced by function.ref, not a bare function name.
numeric on
non-numeric values), or invalid key string. Keys are
alpha, numeric,
ascii, utf-8,
utf-16, utf-32.
this.name is only valid while an
instance method or constructor is running.
this.field = expr; is only valid in
constructorDefine, not in ordinary
methods. See
Classes & OOP.
method.foo(...) when no constructor
or instance method is active (use
obj.foo(...) after
class.createObj).