CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
41 lines
1.7 KiB
ReStructuredText
41 lines
1.7 KiB
ReStructuredText
.. meta::
|
|
:description: Error handling API reference for hipFile, covering the hipFileError_t struct, hipFileOpError_t enum, helper macros, and the ssize_t return convention.
|
|
:keywords: hipFile, error handling, API, ROCm, hipFileError_t, hipFileOpError_t, hipFileGetOpErrorString, error codes
|
|
|
|
*****************************
|
|
Error handling API reference
|
|
*****************************
|
|
|
|
hipFile functions communicate errors through two mechanisms: a dual-field
|
|
``hipFileError_t`` struct returned by most API calls, and a signed ``ssize_t``
|
|
return value used by ``hipFileRead`` and ``hipFileWrite``. This page documents
|
|
the types, constants, function, and helper macros that form the error handling
|
|
surface.
|
|
|
|
For guidance on interpreting errors in practice, see
|
|
:doc:`/reference/api-synchronous-io`.
|
|
|
|
``nodiscard`` attribute
|
|
========================
|
|
|
|
The ``hipFileError_t`` struct carries the ``[[nodiscard]]`` attribute when
|
|
compiled with C++ 17 or newer (``__cplusplus >= 201703L``) or C23 or newer
|
|
(``__STDC_VERSION__ >= 202311L``). The compiler emits a warning if a caller
|
|
discards the return value of any function that returns ``hipFileError_t``.
|
|
|
|
``ssize_t`` return convention
|
|
==============================
|
|
|
|
``hipFileRead`` and ``hipFileWrite`` return an ``ssize_t`` instead of a
|
|
``hipFileError_t``. A non-negative value indicates the number of bytes
|
|
transferred. A return value of ``-1`` signals a system error; check
|
|
``errno`` for details. Any other negative value is the negation of the
|
|
corresponding ``hipFileOpError_t`` code. Use ``IS_HIPFILE_ERR`` and
|
|
``HIPFILE_ERRSTR`` (passing the absolute value) to inspect such errors.
|
|
|
|
Error types
|
|
===============
|
|
|
|
.. doxygengroup:: error
|
|
:content-only:
|