1 /*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include <error_code.h>
17
18 namespace maple {
PrintErrorMessage(int ret)19 void PrintErrorMessage(int ret)
20 {
21 switch (ret) {
22 case kErrorNoError:
23 case kErrorExitHelp:
24 break;
25 case kErrorExit:
26 ERR(kLncErr, "Error Exit!");
27 break;
28 case kErrorInvalidParameter:
29 ERR(kLncErr, "Invalid Parameter!");
30 break;
31 case kErrorInitFail:
32 ERR(kLncErr, "Init Fail!");
33 break;
34 case kErrorFileNotFound:
35 ERR(kLncErr, "File Not Found!");
36 break;
37 case kErrorToolNotFound:
38 ERR(kLncErr, "Tool Not Found!");
39 break;
40 case kErrorCompileFail:
41 ERR(kLncErr, "Compile Fail!");
42 break;
43 case kErrorNotImplement:
44 ERR(kLncErr, "Not Implement!");
45 break;
46 default:
47 break;
48 }
49 }
50 } // namespace maple
51