调整错误码

Signed-off-by: xiekaiming <xiekaiming2@huawei.com>
This commit is contained in:
xiekaiming 2022-10-08 15:20:59 +08:00
parent 79e05adf21
commit cf6be04ae7

View File

@ -15,20 +15,6 @@
import {AsyncCallback} from "./basic"; import {AsyncCallback} from "./basic";
/**
* Enumerates error code.
*
* @since 8
*/
export enum ConfigPolicyErrorCode {
/**
* Input parameter is missing or invalid.
*
* @since 8
*/
PARAM_ERROR = 401,
}
/** /**
* Provides file path related APIS. * Provides file path related APIS.
* *
@ -45,7 +31,7 @@ declare namespace configPolicy {
* @syscap SystemCapability.Customization.ConfigPolicy * @syscap SystemCapability.Customization.ConfigPolicy
* @param relPath the relative path of the config file. * @param relPath the relative path of the config file.
* @return Returns the path of the highest priority config file. * @return Returns the path of the highest priority config file.
* @throws { BusinessError } PARAM_ERROR - the parameter check failed. * @throws { BusinessError } 401 - invalid input parameter.
*/ */
function getOneCfgFile(relPath: string, callback: AsyncCallback<string>); function getOneCfgFile(relPath: string, callback: AsyncCallback<string>);
function getOneCfgFile(relPath: string): Promise<string>; function getOneCfgFile(relPath: string): Promise<string>;
@ -58,7 +44,7 @@ declare namespace configPolicy {
* @syscap SystemCapability.Customization.ConfigPolicy * @syscap SystemCapability.Customization.ConfigPolicy
* @param relPath the relative path of the config file. * @param relPath the relative path of the config file.
* @return Returns paths of config files. * @return Returns paths of config files.
* @throws { BusinessError } PARAM_ERROR - the parameter check failed. * @throws { BusinessError } 401 - invalid input parameter.
*/ */
function getCfgFiles(relPath: string, callback: AsyncCallback<Array<string>>); function getCfgFiles(relPath: string, callback: AsyncCallback<Array<string>>);
function getCfgFiles(relPath: string): Promise<Array<string>>; function getCfgFiles(relPath: string): Promise<Array<string>>;
@ -70,7 +56,7 @@ declare namespace configPolicy {
* @systemapi Hide this for inner system use. * @systemapi Hide this for inner system use.
* @syscap SystemCapability.Customization.ConfigPolicy * @syscap SystemCapability.Customization.ConfigPolicy
* @return Returns paths of config directories. * @return Returns paths of config directories.
* @throws { BusinessError } PARAM_ERROR - the parameter check failed. * @throws { BusinessError } 401 - invalid input parameter.
*/ */
function getCfgDirList(callback: AsyncCallback<Array<string>>); function getCfgDirList(callback: AsyncCallback<Array<string>>);
function getCfgDirList(): Promise<Array<string>>; function getCfgDirList(): Promise<Array<string>>;