Files
OMS/app/openapi/lib/errorcode.php
2026-01-04 19:08:31 +08:00

41 lines
1.7 KiB
PHP

<?php
/**
* Copyright 2012-2026 ShopeX (https://www.shopex.cn)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
class openapi_errorcode {
/**
* 获取
* @param mixed $code code
* @return mixed 返回结果
*/
static public function get($code){
$errorInfos = array(
//系统级错误码
'e000001' => array('code' => 'e000001','msg' => 'system params lost or error'),
'e000002' => array('code' => 'e000002','msg' => 'sign error'),
'e000003' => array('code' => 'e000003','msg' => 'class or method not exist'),
'e000004' => array('code' => 'e000004','msg' => 'no permissions to access'),
'e000005' => array('code' => 'e000005','msg' => 'init interface fail'),
'e000006' => array('code' => 'e000006','msg' => 'application params error'),
'e000007' => array('code' => 'e000007','msg' => 'init template fail'),
'e000008' => array('code' => 'e000008','msg' => 'refer server time invalid'),
'e000009' => array('code' => 'e000009','msg' => 'repeat request invalid'),
);
return $errorInfos[$code] ? $errorInfos[$code] : array('code'=>'','msg'=>'');
}
}