How to check error codes with en¶
$::error::en returns the error code of the most recent error caught by ea, or 0 if no error has occurred:
After catching an error:
Error code reference¶
| Code | Error |
|---|---|
| 1 | SYNTAX ERROR |
| 2 | VALUE ERROR |
| 3 | DOMAIN ERROR |
| 4 | LENGTH ERROR |
| 5 | RANK ERROR |
| 6 | INDEX ERROR |
| 7 | LIMIT ERROR |
| 9 | SECURITY ERROR |
| 11 | CLASS ERROR |
Note
en requires a dummy right argument (any value). Use en 0.
See also: Catch errors, Common errors