diff --git a/api/@ohos.pasteboard.d.ts b/api/@ohos.pasteboard.d.ts index a24ac8170812ac1ad0c321614f39daf410acef42..722c99abcf045939f18650e63524099b818ff971 100644 --- a/api/@ohos.pasteboard.d.ts +++ b/api/@ohos.pasteboard.d.ts @@ -425,8 +425,8 @@ declare namespace pasteboard { * Gets record by index in PasteData. * @param { number } index - indicates the record index in PasteData. * @returns { PasteDataRecord } the record in PasteData with index. - * @throws { BusinessError } 12900001 - if type of index is not number. - * @throws { BusinessError } 12900002 - if index is out of the record count of PasteData. + * @throws { BusinessError } 401 - if type of index is not number. + * @throws { BusinessError } 12900001 - if index is out of the record count of PasteData. * @since 9 */ getRecord(index: number): PasteDataRecord; @@ -478,7 +478,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 } 12900002 - if index is out of the record count of PasteData. + * @throws { BusinessError } 12900001 - if index is out of the record count of PasteData. * @since 9 */ removeRecord(index: number): void; @@ -498,7 +498,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 } 12900002 - if index is out of the record count of PasteData. + * @throws { BusinessError } 12900001 - if index is out of the record count of PasteData. * @since 9 */ replaceRecord(index: number, record: PasteDataRecord): void; @@ -568,7 +568,7 @@ declare namespace pasteboard { /** * Gets pastedata from the system pasteboard. * @returns { Promise } the promise returned by the getData. - * @throws { BusinessError } 1290003 - if another getData is being processed. + * @throws { BusinessError } 12900003 - if another getData is being processed. * @since 9 */ getData(): Promise; @@ -613,7 +613,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 or the system prohibits copying. + * @throws { BusinessError } 12900003 - if another setData is being processed. + * @throws { BusinessError } 12900004 - if the system prohibits copying. * @since 9 */ setData(data: PasteData, callback: AsyncCallback): void; @@ -623,7 +624,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 or the system prohibits copying. + * @throws { BusinessError } 12900003 - if another setData is being processed. + * @throws { BusinessError } 12900004 - if the system prohibits copying. * @since 9 */ setData(data: PasteData): Promise;