diff --git a/api/@ohos.pasteboard.d.ts b/api/@ohos.pasteboard.d.ts index 18375256d33a3137f80a12ab65a30783b5ae6cf4..e2c25e195922a350290c762f75f5acba329fdd11 100644 --- a/api/@ohos.pasteboard.d.ts +++ b/api/@ohos.pasteboard.d.ts @@ -341,7 +341,7 @@ declare namespace pasteboard { * @param { string } mimeType - indicates the MIME type of value. * @param { ValueType } value - content to be saved. * @throws { BusinessError } 401 - if type of mimeType is not string, or the value can not match the mimeType correctly. - * @throws { BusinessError } 12900002 - if the count of records in PasteData exceeds MAX_RECORD_NUM. + * @throws { BusinessError } 12900002 - The number of record exteeds the maximum limit. * @since 9 */ addRecord(mimeType: string, value: ValueType): void; @@ -425,7 +425,7 @@ declare namespace pasteboard { * @param { number } index - indicates the record index in PasteData. * @returns { PasteDataRecord } the record in PasteData with index. * @throws { BusinessError } 401 - if type of index is not number. - * @throws { BusinessError } 12900001 - if index is out of the record count of PasteData. + * @throws { BusinessError } 12900001 - The index is out of the record. * @since 9 */ getRecord(index: number): PasteDataRecord; @@ -477,7 +477,7 @@ declare namespace pasteboard { * Removes a Record based on a specified index. * @param { number } index - indicates the record index in PasteData. * @throws { BusinessError } 401 - if type of index is not number. - * @throws { BusinessError } 12900001 - if index is out of the record count of PasteData. + * @throws { BusinessError } 12900001 - The index is out of the record. * @since 9 */ removeRecord(index: number): void; @@ -497,7 +497,7 @@ declare namespace pasteboard { * @param { number } index - indicates the record index in PasteData. * @param { PasteDataRecord } record - the content of a new record. * @throws { BusinessError } 401 - if type of index is not number or type of record is not PasteDataRecord. - * @throws { BusinessError } 12900001 - if index is out of the record count of PasteData. + * @throws { BusinessError } 12900001 - The index is out of the record. * @since 9 */ replaceRecord(index: number, record: PasteDataRecord): void; @@ -559,7 +559,7 @@ declare namespace pasteboard { * Gets pastedata from the system pasteboard. * @param { AsyncCallback } callback - the callback of getData. * @throws { BusinessError } 401 - if type of callback is not AsyncCallback. - * @throws { BusinessError } 12900003 - if another getData is being processed. + * @throws { BusinessError } 12900003 - Another copy or paste is in progress. * @since 9 */ getData(callback: AsyncCallback): void; @@ -567,7 +567,7 @@ declare namespace pasteboard { /** * Gets pastedata from the system pasteboard. * @returns { Promise } the promise returned by the getData. - * @throws { BusinessError } 12900003 - if another getData is being processed. + * @throws { BusinessError } 12900003 - Another copy or paste is in progress. * @since 9 */ getData(): Promise; @@ -612,8 +612,8 @@ declare namespace pasteboard { * @param { PasteData } data - PasteData will be written to the clipboard * @param { AsyncCallback } callback - the callback of setData. * @throws { BusinessError } 401 - if type of data is not PasteData or type of callback is not AsyncCallback. - * @throws { BusinessError } 12900003 - if another setData is being processed. - * @throws { BusinessError } 12900004 - if the system prohibits copying. + * @throws { BusinessError } 12900003 - Another copy or paste is in progress. + * @throws { BusinessError } 12900004 - Replication is prohibited. * @since 9 */ setData(data: PasteData, callback: AsyncCallback): void; @@ -623,8 +623,8 @@ declare namespace pasteboard { * @param { PasteData } data - PasteData will be written to the clipboard. * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 401 - if type of data is not PasteData. - * @throws { BusinessError } 12900003 - if another setData is being processed. - * @throws { BusinessError } 12900004 - if the system prohibits copying. + * @throws { BusinessError } 12900003 - Another copy or paste is in progress. + * @throws { BusinessError } 12900004 - Replication is prohibited. * @since 9 */ setData(data: PasteData): Promise;