This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
Error Message
Selection service invocation exception.
Description
When a word selection app calls the word selection service API, this error code is reported if the word selection service or its dependent service is abnormal, or if the createPanel API is called to repeatedly create a panel of the same type.
Possible Causes
Solution
Error Message
This selection panel has been destroyed.
Description
This error code is reported when the word selection panel has been destroyed during operation on the panel.
Possible Causes
The word selection panel has been destroyed, and operations continue to be performed on the destroyed panel object.
Solution
Error Message
The application calling the API does not match the application selected in the system settings.
Description
This error code is reported when a user calls the word selection service API using a word selection app not selected in system settings.
Possible Causes
The app calling the word selection service API is not the one selected by the user in system settings.
Solution
Error Message
The interface is called too frequently.
Description
This error code is reported when the API is called too frequently.
Possible Causes
The API is called more than 50 times within 500 ms.
Solution
Ensure that the getSelectionContent API is called only after the selectionCompleted event is detected. Do not call it frequently.
Error Message
The interface is called at the wrong time.
Description
This error code is reported when the getSelectionContent API is called without the selectionCompleted event being detected.
Possible Causes
The API is called at an incorrect time when the user is not performing any word selection operation and the word selection process is not triggered. The correct call sequence is as follows: call the getSelectionContent API only after the selectionCompleted event is detected.
Solution
Trigger word selection again, and call the getSelectionContent API after the selectionCompleted event is detected.
Error Message
The current application is prohibited from accessing content.
Description
When the word selection service attempts to obtain the text content of the current app, this error code is reported if the current app prohibits this operation.
Possible Causes
The text content of the app cannot be accessed by other apps through settings such as CopyOptions.InApp.
Solution
Error Message
The length of selected content is out of range.
Description
This error code is reported when the length of the text content selected by word selection exceeds the allowed range (6000 bytes).
Possible Causes
The selected text content exceeds the length limit of 6000 bytes.
Solution
Select text within the range of 1 to 6000 bytes (inclusive), and call the getSelectionContent API after the selectionCompleted event is detected.
Error Message
Getting the selected content times out.
Description
When the word selection service attempts to obtain the selected text content from the target app, this error code is reported if the target app does not return the content within the specified time (100 ms).
Possible Causes
Solution