What does a specific EK9 error code mean?
← Debugging and Troubleshooting · Ref: Q248
Every EK9 compiler error has a unique code in the format EXXXXX (E followed by five digits). Use 'ek9 -h EXXXXX' to look up any error code for a detailed explanation.
LOOKING UP ERROR CODES
Run the following command to see a detailed explanation:
ek9 -h E50030
This works offline and shows what the error means, what causes it, and how to fix it.
ERROR CODE RANGES
Error codes are organised into ranges by category:
E01xxx - Names and Identifiers
E01010: Invalid identifier name E01020: Reserved word used as identifier E01030: Excluded keyword (break, continue, return do not exist in EK9)
E02xxx - Duplicate Definitions
E02010: Duplicate type definition E02020: Duplicate method or property name E02030: Duplicate module definition
E04xxx - Type Constraints
E04010: Type must extend Exception (for throw/catch) E04020: Not a valid candidate for this context
E05xxx - Type Hierarchy
E05020: Circular type hierarchy detected E05030: Type is not open for extension (closed by default) E05120: Method must use override keyword (overriding base method)
E06xxx - Parameters and Arguments
E06260: Parameter type mismatch E06280: Too many parameters for this operator or method E06290: Too few parameters E06330: Function signature does not match
E07xxx - Operators and Methods
E07500: Operator must be pure but is not declared pure E07510: Operator cannot be pure (mutation operators) E07520: Incorrect return type for operator E07550: Comparison operator must return Boolean E07570: Hash operator must return Integer E07580: String operator must return String E07620: Operator not defined on this type
E08xxx - Flow Analysis and DI
E08020: Variable used before it is initialised E08030: Variable not checked with ? before access E08050: Return variable not initialised on all paths E08190: Circular dependency injection detected
E11xxx - Code Quality
E11031: Variable name matches common convention violation E11032: Variable name is a reserved word E11040: Method complexity exceeds threshold
E50xxx - Resolution
E50030: Symbol not resolved (variable, type, method, or function not found)
COMMON FIRST ERRORS
The most common errors for new EK9 developers are:
E50030: Check spelling and ensure imports are correct E05030: Mark the base type 'as open' if you intend to extend it E08020: Initialise the variable before using it E06280/E06290: Check operator parameter counts
See Q247 for understanding error message format. See Q252 for verbose compilation modes. See Q238 for the complete operator set and enforcement rules. See Q290 for E11031 and E11032 naming errors. See Q291 for naming error troubleshooting. See Q311 for the complete quality checks catalog.
Example
defines module qa.debugging.errorcodelookup defines class Account name <- String() balance <- Float() Account() -> accountName as String initialBalance as Float require accountName? require initialBalance? require initialBalance >= 0.0 this.name :=: accountName this.balance :=: initialBalance deposit() -> amount as Float require amount? require amount > 0.0 balance += amount getBalance() as pure <- rtn as Float: balance operator $ as pure <- rtn as String: `Account(${name}, ${balance})` operator == as pure -> other as Account <- rtn as Boolean: name == other.name operator <=> as pure -> other as Account <- rtn as Integer: balance <=> other.balance override operator ? as pure <- rtn as Boolean: name? and balance? defines program ErrorCodeDemo() stdout <- Stdout() // Correctly constructed class with operators acc <- Account("Alice", 100.0) stdout.println(`Account: ${acc}`) acc.deposit(50.0) stdout.println(`After deposit: ${acc}`) stdout.println(`Balance: ${acc.getBalance()}`) // Correct comparison usage acc2 <- Account("Bob", 200.0) stdout.println(`Equal: ${acc == acc2}`) stdout.println(`Compare: ${acc <=> acc2}`)
Common mistakes
E50060 — Calling a method that does not exist on the type produces a resolution error. The Account class defines 'deposit' but not 'withdraw'. See ek9 -h E50060 for details.
Incorrect:
acc.withdraw(50.0)
Correct:
acc.deposit(50.0)
E08090 — If 'balance' is declared but never used in any expression or output, the compiler rejects it as unused. See ek9 -h E08090 for details.
Incorrect:
balance <- acc.getBalance()
Correct:
stdout.println(`Balance: ${acc.getBalance()}`)
Other ways to ask this
- How do I look up an EK9 error code?
- What are the EK9 error code ranges?
- How do I find what EXXXXX means in EK9?
Coming from another language?
Java: javac error codes are not standardised, IDEs provide error databases. Python: no error code system, SyntaxError and named exceptions. Rust: E0001-E0999 error codes with 'rustc --explain E0308'. Go: no standardised error codes, terse messages. C++: compiler-specific error codes (GCC, Clang, MSVC all different). Kotlin: no standardised error codes, IDE-centric. EK9: unified EXXXXX error codes across all phases, offline lookup with 'ek9 -h EXXXXX', organised by category ranges.
Keywords: E50030, code, resolve, error, troubleshoot, E08020, E05030, error-message, help, category, meaning, range, lookup, explain, EXXXXX, debug