Error-Lang produces nine categories of errors as co-products of program development. Each category teaches different aspects of programming language theory and software engineering.
Phase: Lexical/Parsing
Errors in the structure of code that violate the language grammar.
| Code | Error | Example |
|---|---|---|
E0001 |
Unexpected token |
|
E0002 |
Unterminated string |
|
E0003 |
Invalid escape |
|
E0004 |
Illegal character |
|
E0005 |
Missing 'end' |
Unclosed block |
E0006 |
Unmatched paren |
|
E0007 |
Smart quote |
|
E0008 |
Bad identifier |
|
E0009 |
Reserved keyword |
|
E0010 |
Whitespace issue |
Bad indentation |
Learning Objective: Understanding lexers and parsers
Phase: Execution
Errors that occur during program execution.
| Code | Error | Example |
|---|---|---|
E0101 |
Null reference |
|
E0102 |
Index out of bounds |
|
E0103 |
Stack overflow |
Infinite recursion |
E0104 |
Type mismatch |
|
E0105 |
Division by zero |
|
E0106 |
Undefined variable |
Using unbound name |
E0107 |
Invalid operation |
Operation not defined |
Learning Objective: Understanding runtime behavior
Phase: Semantic Analysis
The program runs but produces incorrect results.
| Code | Error | Example |
|---|---|---|
E0201 |
Off-by-one |
|
E0202 |
Wrong operator |
|
` |
E0203 |
|
Comparison inversion |
|
E0204 |
Assignment vs equality |
|
E0205 |
Infinite loop |
Missing increment |
E0206 |
Dead code |
Unreachable statements |
E0207 |
Learning Objective: Debugging and testing
Phase: Static Analysis
Code is syntactically valid but meaningless or contradictory.
| Code | Error | Example |
|---|---|---|
E0301 |
Type incompatibility |
|
E0302 |
Arity mismatch |
|
E0303 |
Duplicate definition |
Same name twice |
E0304 |
Shadowing warning |
Inner scope hides outer |
E0305 |
Unused variable |
Declared but never used |
E0306 |
Unreachable pattern |
Match never taken |
E0307 |
Invalid coercion |
Types can’t convert |
Learning Objective: Type systems and static analysis
Phase: Module Resolution
Errors in connecting program parts together.
| Code | Error | Example |
|---|---|---|
E0401 |
Module not found |
|
E0402 |
Circular import |
A imports B imports A |
E0403 |
Symbol not exported |
Using private symbol |
E0404 |
Version mismatch |
Incompatible module |
E0405 |
Duplicate export |
Same name exported twice |
E0406 |
Missing dependency |
Required module absent |
Learning Objective: Module systems and dependencies
Phase: System Interaction
Errors related to system resources.
| Code | Error | Example |
|---|---|---|
E0501 |
File not found |
|
E0502 |
Permission denied |
No read/write access |
E0503 |
Out of memory |
Too large allocation |
E0504 |
Timeout |
Operation too slow |
E0505 |
Network error |
Connection failed |
E0506 |
Resource exhausted |
Too many handles |
E0507 |
Resource leak |
Unclosed file/socket |
Learning Objective: Resource management and cleanup
Phase: Numeric Operations
Errors in mathematical computations.
| Code | Error | Example |
|---|---|---|
E0601 |
Division by zero |
|
E0602 |
Integer overflow |
|
E0603 |
Underflow |
|
E0604 |
NaN result |
|
E0605 |
Infinity |
|
E0606 |
Precision loss |
Float rounding |
E0607 |
Negative sqrt |
|
Learning Objective: Numeric representation and limits
Phase: API/Contract
Errors in interface contracts between components.
| Code | Error | Example |
|---|---|---|
E0701 |
Missing method |
Interface not satisfied |
E0702 |
Wrong signature |
Method has wrong type |
E0703 |
Precondition failed |
Input validation |
E0704 |
Postcondition failed |
Output validation |
E0705 |
Invariant violated |
State corruption |
E0706 |
Protocol violation |
Wrong call order |
E0707 |
Version incompatible |
API changed |
Learning Objective: Design by contract, APIs
Phase: Safety Analysis
Errors that could lead to security vulnerabilities.
| Code | Error | Example |
|---|---|---|
E0801 |
Injection risk |
Unescaped input |
E0802 |
Buffer overflow |
Writing past bounds |
E0803 |
Path traversal |
|
E0804 |
Sensitive data exposure |
Logging secrets |
E0805 |
Race condition |
Concurrent access |
E0806 |
Privilege escalation |
Unauthorized action |
E0807 |
Cryptographic weakness |
Bad random, weak algo |
Learning Objective: Secure coding practices
| Level | Categories | Focus |
|---|---|---|
Beginner |
Syntax |
Grammar and structure |
Intermediate |
Runtime, Logical |
Debugging |
Advanced |
Semantic, Linker |
Type systems, modules |
Expert |
Resource, Security |
Systems programming |
The gutter (ошибка) block is where errors are injected:
-
One category per run - Each execution injects errors from one category
-
Progressive difficulty - Run counter affects category selection
-
Recoverable - All injected errors allow program continuation
-
Documented - Every error links to curriculum
| Category | Score Reduction | Reasoning |
|---|---|---|
Syntax |
-5 |
Common, easily fixed |
Runtime |
-10 |
More complex debugging |
Logical |
-15 |
Requires understanding intent |
Semantic |
-10 |
Type system concepts |
Linker |
-5 |
Configuration issues |
Resource |
-10 |
System interaction |
Arithmetic |
-10 |
Numeric edge cases |
Interface |
-15 |
Design concepts |
Security |
-20 |
Critical importance |
Echo erasure |
-15 |
Structured loss is not free: |
|
Note
|
The Echo-erasure debit is not an error category — it is a deliberate,
visible decomposition cost. It appears here because it feeds the same Stability
Score. See docs/Echo-Decomposition.adoc and spec/type-system.md §7.
|
Source Code
│
▼ [Syntax Errors: E00xx]
┌─────────┐
│ Lexer │
└────┬────┘
│
▼ [Syntax Errors: E00xx]
┌─────────┐
│ Parser │
└────┬────┘
│
▼ [Semantic Errors: E03xx]
┌─────────────┐
│ Type Check │
└──────┬──────┘
│
▼ [Linker Errors: E04xx]
┌─────────────┐
│ Module Res │
└──────┬──────┘
│
▼ [Runtime Errors: E01xx]
┌───────────┐ [Logical: E02xx]
│ Executor │ [Resource: E05xx]
└─────┬─────┘ [Arithmetic: E06xx]
│ [Interface: E07xx]
▼ [Security: E08xx]
OutputEach error category maps to course modules:
-
Syntax → "Introduction to Parsing"
-
Runtime → "Program Execution"
-
Logical → "Debugging Techniques"
-
Semantic → "Type Systems"
-
Linker → "Module Systems"
-
Resource → "Systems Programming"
-
Arithmetic → "Numeric Computing"
-
Interface → "Software Design"
-
Security → "Secure Coding"