harmony 鸿蒙drawing_error_code.h

  • 2025-06-12
  • 浏览 (5)

drawing_error_code.h

Overview

The drawing_error_code.h file declares the functions related to the error code in the drawing module.

File to include: <native_drawing/drawing_error_code.h>

Library: libnative_drawing.so

Since: 12

Related module: Drawing

Summary

Types

Name Description
typedef enum OH_Drawing_ErrorCode OH_Drawing_ErrorCode Defines an enum for the error codes that may be generated by the module.

Enums

Name Description
OH_Drawing_ErrorCode { OH_DRAWING_SUCCESS = 0, OH_DRAWING_ERROR_NO_PERMISSION = 201, OH_DRAWING_ERROR_INVALID_PARAMETER = 401, OH_DRAWING_ERROR_PARAMETER_OUT_OF_RANGE = 26200001,OH_DRAWING_ERROR_ALLOCATION_FAILED = 26200002 } Enumerates the error codes that may be generated by the module.

Functions

Name Description
OH_Drawing_ErrorCode OH_Drawing_ErrorCodeGet () Obtains the latest error code of the module. After the function is successfully executed, the error code returned by this function will not be modified.
void OH_Drawing_ErrorCodeReset (void) Resets the error code of this module to OH_DRAWING_SUCCESS.
When a function that does not return an error code fails, the error code obtained through OH_Drawing_ErrorCodeGet is reset to the corresponding error number. However, it is not reset to OH_DRAWING_SUCCESS for a successful operation.
By calling this function, you can manually reset the error code to OH_DRAWING_SUCCESS, avoiding interference between different functions and simplifying the debugging process.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkGraphics 2D

harmony 鸿蒙BufferHandle

harmony 鸿蒙ColorSpacePrimaries

harmony 鸿蒙DisplaySoloist_ExpectedRateRange

harmony 鸿蒙_drawing

harmony 鸿蒙NativeColorSpaceManager

harmony 鸿蒙NativeDisplaySoloist

harmony 鸿蒙NativeVsync

harmony 鸿蒙NativeWindow

harmony 鸿蒙OH_Drawing_BitmapFormat

0  赞