returnValue:
Error types
Lexing and parsing happen before any statement runs, so a
LexError or ParseError means no part of the script was executed.
Runtime errors
ARuntimeError stops the script at the statement that caused it. Common causes:
- A value doesn’t match a variable’s or parameter’s type:
Cannot use a int32 value as string in the declaration of 's'. - A name isn’t declared, or is declared twice:
Unknown variable 'y',Variable 'x' is already declared and cannot be redeclared. - Assigning to a
constor a contract parameter:Cannot assign to 'limit' because it is a const. - An integer overflows its type:
int32 overflow: 2147483648. - Dividing by zero.
- A list index is out of bounds or not an integer.
- An
ifcondition, or an operand of!,&&or||, isn’t a boolean. - Reading a property of something that isn’t an object.
- A resource is unknown, or a resource function is called with missing, unknown or wrongly typed arguments.