错误码整改

Signed-off-by: 徐未来 <xuweilai2@huawei.com>
This commit is contained in:
徐未来 2024-04-18 20:55:24 +08:00
parent a088f447bb
commit a7b88af3c7
2 changed files with 38 additions and 38 deletions

View File

@ -36,7 +36,7 @@ declare namespace systemDateTime {
* @param { AsyncCallback<void> } callback - The callback of setTime
* @throws { BusinessError } 201 - Permission denied
* @throws { BusinessError } 202 - Permission denied, Non system application use system APIs
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use
* @since 9
@ -50,7 +50,7 @@ declare namespace systemDateTime {
* @returns { Promise<void> } The promise returned by the function
* @throws { BusinessError } 201 - Permission denied
* @throws { BusinessError } 202 - Permission denied, Non system application use system APIs
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use
* @since 9
@ -62,7 +62,7 @@ declare namespace systemDateTime {
*
* @param { boolean } isNano - True if the result is in nanoseconds, otherwise in milliseconds
* @param { AsyncCallback<number> } callback - The callback of getCurrentTime
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @since 9
*/
@ -72,7 +72,7 @@ declare namespace systemDateTime {
* Obtains the number of milliseconds that have elapsed since the Unix epoch.
*
* @param { AsyncCallback<number> } callback - The callback of getCurrentTime
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @since 9
*/
@ -83,7 +83,7 @@ declare namespace systemDateTime {
*
* @param { boolean } isNano - True if the result is in nanoseconds, otherwise in milliseconds
* @returns { Promise<number> } The promise returned by the function
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @since 9
*/
@ -104,7 +104,7 @@ declare namespace systemDateTime {
*
* @param { boolean } isNano - True if the result is in nanoseconds., otherwise in milliseconds
* @param { AsyncCallback<number> } callback - The callback of getRealActiveTime
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @since 9
*/
@ -114,7 +114,7 @@ declare namespace systemDateTime {
* Obtains the number of milliseconds elapsed since the system was booted, not including deep sleep time.
*
* @param { AsyncCallback<number> } callback - The callback of getRealActiveTime
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @since 9
*/
@ -125,7 +125,7 @@ declare namespace systemDateTime {
*
* @param { boolean } [isNano] - True if the result is in nanoseconds, otherwise in milliseconds
* @returns { Promise<number> } The promise returned by the function
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @since 9
*/
@ -136,7 +136,7 @@ declare namespace systemDateTime {
*
* @param { boolean } isNano - True if the result is in nanoseconds, otherwise in milliseconds
* @param { AsyncCallback<number> } callback - The callback of getRealTime
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @since 9
*/
@ -146,7 +146,7 @@ declare namespace systemDateTime {
* Obtains the number of milliseconds elapsed since the system was booted, including deep sleep time.
*
* @param { AsyncCallback<number> } callback - The callback of getRealTime
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @since 9
*/
@ -157,7 +157,7 @@ declare namespace systemDateTime {
*
* @param { boolean } [isNano] - True if the result is in nanoseconds, otherwise in milliseconds
* @returns { Promise<number> } The promise returned by the function
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @since 9
*/
@ -191,7 +191,7 @@ declare namespace systemDateTime {
/**
* Obtains the number of milliseconds since the system has been running.
*
* @param { TimeType } timeType - indicates the type of get uptime.
* @param { TimeType } timeType - indicates the type of get uptime. It can only be `STARTUP` or `ACTIVE`.
* @param { boolean } [ isNanoseconds ] - True if the result is in nanoseconds, otherwise in milliseconds
* @returns { number } The timestamp returned of getUpTime.
* @syscap SystemCapability.MiscServices.Time
@ -203,11 +203,11 @@ declare namespace systemDateTime {
* Sets the system time.
*
* @permission ohos.permission.SET_TIME
* @param { Date } date - The target date
* @param { Date } date - The target date, it must > 0
* @param { AsyncCallback<void> } callback - The callback of setDate
* @throws { BusinessError } 201 - Permission denied
* @throws { BusinessError } 202 - Permission denied, Non system application use system APIs
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed;
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use
* @since 9
@ -220,11 +220,11 @@ declare namespace systemDateTime {
* Sets the system time.
*
* @permission ohos.permission.SET_TIME
* @param { Date } date - The target date
* @param { Date } date - The target date, it must > 0
* @returns { Promise<void> } The promise returned by the function
* @throws { BusinessError } 201 - Permission denied
* @throws { BusinessError } 202 - Permission denied, Non system application use system APIs
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed;
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use
* @since 9
@ -237,7 +237,7 @@ declare namespace systemDateTime {
* Obtains the system date.
*
* @param { AsyncCallback<Date> } callback - The callback of getDate
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.System error;
* @syscap SystemCapability.MiscServices.Time
* @since 9
* @deprecated since 10
@ -249,7 +249,7 @@ declare namespace systemDateTime {
* Obtains the system date.
*
* @returns { Promise<Date> } The promise returned by the function
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.System error;
* @syscap SystemCapability.MiscServices.Time
* @since 9
* @deprecated since 10
@ -265,7 +265,7 @@ declare namespace systemDateTime {
* @param { AsyncCallback<void> } callback - The callback of setTimezone
* @throws { BusinessError } 201 - Permission denied
* @throws { BusinessError } 202 - Permission denied, Non system application use system APIs
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use
* @since 9
@ -280,7 +280,7 @@ declare namespace systemDateTime {
* @returns { Promise<void> } The promise returned by the function
* @throws { BusinessError } 201 - Permission denied
* @throws { BusinessError } 202 - Permission denied, Non system application use system APIs
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types;
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use
* @since 9
@ -291,7 +291,7 @@ declare namespace systemDateTime {
* Obtains the system time zone.
*
* @param { AsyncCallback<string> } callback - The callback of getTimezone
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.System error.
* @syscap SystemCapability.MiscServices.Time
* @since 9
*/
@ -301,7 +301,7 @@ declare namespace systemDateTime {
* Obtains the system time zone.
*
* @returns { Promise<string> } The promise returned by the function
* @throws { BusinessError } 401 - Invalid parameters
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.System error.
* @syscap SystemCapability.MiscServices.Time
* @since 9
*/

View File

@ -75,8 +75,8 @@ declare namespace systemTimer {
*
* @param { TimerOptions } options - The timer options.
* @param { AsyncCallback<number> } callback - {number} is the timer ID.
* @throws { BusinessError } 202 - permission denied.
* @throws { BusinessError } 401 - if the parameter type is incorrect.
* @throws { BusinessError } 202 - permission denied, Non system application use system APIs.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use.
* @since 7
@ -88,8 +88,8 @@ declare namespace systemTimer {
*
* @param { TimerOptions } options - The timer options.
* @returns { Promise<number> } the timer ID.
* @throws { BusinessError } 202 - permission denied.
* @throws { BusinessError } 401 - if the parameter type is incorrect.
* @throws { BusinessError } 202 - permission denied, Non system application use system APIs.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use.
* @since 7
@ -104,8 +104,8 @@ declare namespace systemTimer {
* The time will be automatically set to 5000 milliseconds after the current time if the passed
* value is smaller than the current time plus 5000 milliseconds.
* @param { AsyncCallback<void> } callback - The callback function.
* @throws { BusinessError } 202 - permission denied.
* @throws { BusinessError } 401 - if the parameter type is incorrect.
* @throws { BusinessError } 202 - permission denied, Non system application use system APIs.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use.
* @since 7
@ -120,8 +120,8 @@ declare namespace systemTimer {
* The time will be automatically set to 5000 milliseconds after the current time if the passed
* value is smaller than the current time plus 5000 milliseconds.
* @returns { Promise<void> } return a promise object.
* @throws { BusinessError } 202 - permission denied.
* @throws { BusinessError } 401 - if the parameter type is incorrect.
* @throws { BusinessError } 202 - permission denied, Non system application use system APIs.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use.
* @since 7
@ -133,8 +133,8 @@ declare namespace systemTimer {
*
* @param { number } timer - The timer ID.
* @param { AsyncCallback<void> } callback - The callback function.
* @throws { BusinessError } 202 - permission denied.
* @throws { BusinessError } 401 - if the parameter type is incorrect.
* @throws { BusinessError } 202 - permission denied, Non system application use system APIs.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use.
* @since 7
@ -146,8 +146,8 @@ declare namespace systemTimer {
*
* @param { number } timer - The timer ID.
* @returns { Promise<void> } return a promise object.
* @throws { BusinessError } 202 - permission denied.
* @throws { BusinessError } 401 - if the parameter type is incorrect.
* @throws { BusinessError } 202 - permission denied, Non system application use system APIs.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use.
* @since 7
@ -159,8 +159,8 @@ declare namespace systemTimer {
*
* @param { number } timer - The timer ID.
* @param { AsyncCallback<void> } callback - The callback function.
* @throws { BusinessError } 202 - permission denied.
* @throws { BusinessError } 401 - if the parameter type is incorrect.
* @throws { BusinessError } 202 - permission denied, Non system application use system APIs.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use.
* @since 7
@ -172,8 +172,8 @@ declare namespace systemTimer {
*
* @param { number } timer - The timer ID.
* @returns { Promise<void> } return a promise object.
* @throws { BusinessError } 202 - permission denied.
* @throws { BusinessError } 401 - if the parameter type is incorrect.
* @throws { BusinessError } 202 - permission denied, Non system application use system APIs.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types.
* @syscap SystemCapability.MiscServices.Time
* @systemapi Hide this for inner system use.
* @since 7