diff --git a/docs/source/user_guide/error_handling.rst b/docs/source/user_guide/error_handling.rst new file mode 100644 index 00000000..03cfb93c --- /dev/null +++ b/docs/source/user_guide/error_handling.rst @@ -0,0 +1,33 @@ +Error handling +============== + +All Access Layer functions use the status codes below. The status code +indicates where the error occurred, while the accompanying message describes +the specific problem. Inspect the full status message for details. + +.. list-table:: Access Layer status codes + :header-rows: 1 + :widths: 10 25 65 + + * - Code + - Constant + - Meaning + * - ``0`` + - + - Success + * - ``-1`` + - ``UNKNOWN_ERR`` + - Unexpected or unclassified error + * - ``-2`` + - ``CONTEXT_ERR`` + - Invalid Access Layer context or operation + * - ``-3`` + - ``BACKEND_ERR`` + - Error reported by the selected storage backend + * - ``-4`` + - ``LOWLEVEL_ERR`` + - Error in IMAS-Core processing + +The C API provides the numeric status code and a detailed error message. +Other language interfaces may return this status or report it as an +exception. \ No newline at end of file diff --git a/docs/source/user_guide/index.rst b/docs/source/user_guide/index.rst index 1b8beebc..65164fd2 100644 --- a/docs/source/user_guide/index.rst +++ b/docs/source/user_guide/index.rst @@ -12,3 +12,4 @@ backend options, and configuration settings to help you get started with IMAS-Co uris_guide backends_guide configuration + error_handling