1# oh_preferences_err_code.h 2 3## Overview 4 5Defines the error codes used in the **Preferences** module. 6 7**File to include**: <database/preferences/oh_preferences_err_code.h> 8 9**Library**: libohpreferences.so 10 11**System capability**: SystemCapability.DistributedDataManager.Preferences.Core 12 13**Since**: 13 14 15**Related module**: [Preferences](capi-preferences.md) 16 17## Summary 18 19### Enums 20 21| Name | typedef Keyword | Description | 22| ------------------------------------------------- | ---------------------- | ------------ | 23| [OH_Preferences_ErrCode](#oh_preferences_errcode) | OH_Preferences_ErrCode | Enumerates the error codes.| 24 25## Enum Description 26 27### OH_Preferences_ErrCode 28 29``` 30enum OH_Preferences_ErrCode 31``` 32 33**Description** 34 35Enumerates the error codes. 36 37**Since**: 13 38 39| Enum Item | Description | 40| ------------------------------------------------- | -------------------------- | 41| PREFERENCES_OK = 0 | The operation is successful. | 42| PREFERENCES_ERROR_INVALID_PARAM = 401 | Invalid parameter. | 43| PREFERENCES_ERROR_NOT_SUPPORTED = 801 | The system capability is not supported. | 44| PREFERENCES_ERROR_BASE = 15500000 | Base error code. | 45| PREFERENCES_ERROR_DELETE_FILE = 15500010 | Failed to delete the file. | 46| PREFERENCES_ERROR_STORAGE = 15500011 | The storage is abnormal. | 47| PREFERENCES_ERROR_MALLOC = 15500012 | Memory allocation fails. | 48| PREFERENCES_ERROR_KEY_NOT_FOUND = 15500013 | The key does not exist. | 49| PREFERENCES_ERROR_GET_DATAOBSMGRCLIENT = 15500019 | Failed to obtain the data change subscription service.| 50