1
0
mirror of https://github.com/TREX-CoE/trexio.git synced 2024-12-23 04:43:57 +01:00

Improved error messages

This commit is contained in:
Anthony Scemama 2021-05-06 19:54:37 +02:00
parent 181fe988f3
commit 7302f02b9c

View File

@ -114,31 +114,31 @@ typedef int32_t trexio_exit_code;
** Error handling
#+NAME: table-exit-codes
| Macro | Code | Description |
|-----------------------------+------+--------------------------------|
| ~TREXIO_FAILURE~ | -1 | 'Unknown failure' |
| ~TREXIO_SUCCESS~ | 0 | 'Success' |
| ~TREXIO_INVALID_ARG_1~ | 1 | 'Invalid argument 1' |
| ~TREXIO_INVALID_ARG_2~ | 2 | 'Invalid argument 2' |
| ~TREXIO_INVALID_ARG_3~ | 3 | 'Invalid argument 3' |
| ~TREXIO_INVALID_ARG_4~ | 4 | 'Invalid argument 4' |
| ~TREXIO_INVALID_ARG_5~ | 5 | 'Invalid argument 5' |
| ~TREXIO_END~ | 6 | 'End of file' |
| ~TREXIO_READONLY~ | 7 | 'Read-only file' |
| ~TREXIO_ERRNO~ | 8 | strerror(errno) |
| ~TREXIO_INVALID_ID~ | 9 | 'Invalid ID' |
| ~TREXIO_ALLOCATION_FAILED~ | 10 | 'Allocation failed' |
| ~TREXIO_HAS_NOT~ | 11 | 'Element absent' |
| ~TREXIO_INVALID_NUM~ | 12 | 'Invalid exit code' |
| ~TREXIO_NUM_ALREADY_EXISTS~ | 13 | 'This variable already exists' |
| ~TREXIO_OPEN_ERROR~ | 14 | 'Error opening file' |
| ~TREXIO_LOCK_ERROR~ | 15 | 'Error locking file' |
| ~TREXIO_UNLOCK_ERROR~ | 16 | 'Error unlocking file' |
| ~TREXIO_FILE_ERROR~ | 17 | 'Invalid file handle' |
| ~TREXIO_GROUP_READ_ERROR~ | 18 | 'Error reading group' |
| ~TREXIO_GROUP_WRITE_ERROR~ | 19 | 'Error writing group' |
| ~TREXIO_ELEM_READ_ERROR~ | 20 | 'Error reading element' |
| ~TREXIO_ELEM_WRITE_ERROR~ | 21 | 'Error writing element' |
| Macro | Code | Description |
|-----------------------------+------+---------------------------|
| ~TREXIO_FAILURE~ | -1 | 'Unknown failure' |
| ~TREXIO_SUCCESS~ | 0 | 'Success' |
| ~TREXIO_INVALID_ARG_1~ | 1 | 'Invalid argument 1' |
| ~TREXIO_INVALID_ARG_2~ | 2 | 'Invalid argument 2' |
| ~TREXIO_INVALID_ARG_3~ | 3 | 'Invalid argument 3' |
| ~TREXIO_INVALID_ARG_4~ | 4 | 'Invalid argument 4' |
| ~TREXIO_INVALID_ARG_5~ | 5 | 'Invalid argument 5' |
| ~TREXIO_END~ | 6 | 'End of file' |
| ~TREXIO_READONLY~ | 7 | 'Read-only file' |
| ~TREXIO_ERRNO~ | 8 | strerror(errno) |
| ~TREXIO_INVALID_ID~ | 9 | 'Invalid ID' |
| ~TREXIO_ALLOCATION_FAILED~ | 10 | 'Allocation failed' |
| ~TREXIO_HAS_NOT~ | 11 | 'Element absent' |
| ~TREXIO_INVALID_NUM~ | 12 | 'Invalid dimensions' |
| ~TREXIO_NUM_ALREADY_EXISTS~ | 13 | 'Variable already exists' |
| ~TREXIO_OPEN_ERROR~ | 14 | 'Error opening file' |
| ~TREXIO_LOCK_ERROR~ | 15 | 'Error locking file' |
| ~TREXIO_UNLOCK_ERROR~ | 16 | 'Error unlocking file' |
| ~TREXIO_FILE_ERROR~ | 17 | 'Invalid file handle' |
| ~TREXIO_GROUP_READ_ERROR~ | 18 | 'Error reading group' |
| ~TREXIO_GROUP_WRITE_ERROR~ | 19 | 'Error writing group' |
| ~TREXIO_ELEM_READ_ERROR~ | 20 | 'Error reading element' |
| ~TREXIO_ELEM_WRITE_ERROR~ | 21 | 'Error writing element' |
# We need to force Emacs not to indent the Python code:
# -*- org-src-preserve-indentation: t