Snakel/Errors
- ← Back to Snakel
- This is still a work in progress. It may be changed in the future.
If you make an error in the code (for example putting an undefined variable into the code) in a Snakel interpreter. Then the terminal (or emiter as it's called in the gammaline universe) will emit an error and will explain and show where you made a mistake
TypeError
Using a wrong type in a variable
code:
1: !for example
2: num a="eso"
emiter:
Current operation stopped
Error type:TypeError
At what line:line 2
Explanation:
2: num a="eso"
-----
Wrong value type. num is used as a's type, str was used instead
Not specifying a type or specify a non existent type to a variable
code:
1: i=user
emiter:
Current operation stopped
Error type:TypeError
At what line:line 1
Explanation:
1: i=user
^
Invalid type. "" is not a "Type"
Removing an entry that is not on the list
code:
1: l=["H","I"]
2: entry.pop(l,"!")
emiter:
Current operation stopped
Error type:TypeError
At what line:line 2
Explanation:
2: entry.pop(l,"!")
---
Pop non-related entry from list. "!" is not an element on "l"