Error Handling
Demonstrates Ragul's error model: operations that can fail return a vagy (or) type, -e / -? propagates errors upward automatically, and -hibára / -catch catches them at the boundary.
Output:
How it works
-számmá / -tonum returns vagy-Szám-vagy-Hiba — either a number or an error. The -e / -? suffix after -va / -doing means: "if this produced an error, propagate it upward immediately."
n-be "not-a-number"-számmá-va-e.
│ │ │
│ │ └── propagate error if failure
│ └── execute the operation
└── attempt to parse as number
When the error propagates, execution jumps directly to the -hibára / -catch block, skipping any remaining sentences in the scope.
The -hibára / -catch boundary
-hibára is a sibling block to the scope body — structurally identical to -hanem / -else for conditionals:
Note
hiba is the built-in name bound to the error value inside a catch block.
It is a variable name, not a suffix — it does not have an English alias.
If no -hibára / -catch is present and an error reaches the top of the program, it is fatal — the program terminates with exit code 3.
Error propagation chain
-e / -? can appear anywhere in a chain. Multiple fallible operations in sequence will each propagate to the same -hibára / -catch: