Apollo 10.0
自动驾驶开放平台
apollo::hdmap::ExceptionHandler类 参考

#include <exception_handler.h>

apollo::hdmap::ExceptionHandler 的协作图:

静态 Public 成员函数

static int ExceptionHandlerFun (ErrorCode error_code)
 

详细描述

在文件 exception_handler.h22 行定义.

成员函数说明

◆ ExceptionHandlerFun()

int apollo::hdmap::ExceptionHandler::ExceptionHandlerFun ( ErrorCode  error_code)
static

在文件 exception_handler.cc25 行定义.

25 {
26 int ret = 0;
27 switch (error_code) {
29 AINFO << "ErrorCode::SUCCESS";
30 fprintf(USER_STREAM, "SUCCESS\n");
31 break;
33 AINFO << "ErrorCode::ERROR_CHECK_BEFORE_START";
34 fprintf(USER_STREAM,
35 "Do not start repeated. This request will be ignored\n");
36 break;
38 AINFO << "ErrorCode::ERROR_CHECK_BEFORE_START";
39 fprintf(USER_STREAM,
40 "Start command should be called before check. This request will "
41 "be ignored\n");
42 break;
44 AINFO << "ErrorCode::ERROR_REQUEST";
45 fprintf(USER_STREAM, "Request error. This request will be ignored\n");
46 break;
48 AINFO << "ErrorCode::ERROR_GNSS_SIGNAL_FAIL."
49 << "Please check if area is spacious";
50 fprintf(USER_STREAM,
51 "ERROR: GNSS signal do not meet the requirements, please make "
52 "sure area is spacious\n");
53 ret = -1;
54 break;
56 AINFO << "ErrorCode::ERROR_VERIFY_NO_GNSSPOS."
57 << "Please check if channel /apollo/sensor/gnss/best_pose exists "
58 "in system";
59 fprintf(USER_STREAM,
60 "ERROR:System has no channel /apollo/sensor/gnss/best_pose, you "
61 "may need to reboot system\n");
62 ret = -1;
63 break;
65 AINFO << "ErrorCode::ERROR_NOT_STATIC. Please keep the car still";
66 fprintf(USER_STREAM, "ERROR:Please keep the car still\n");
67 ret = -1;
68 break;
70 AINFO << "ErrorCode::ERROR_NOT_EIGHT_ROUTE. "
71 << "Please keep the car 8-like maneuver";
72 fprintf(USER_STREAM, "WARNING:Please keep the car 8-like maneuver\n");
73 break;
75 AINFO << "ErrorCode.ERROR_LOOPS_NOT_REACHED";
76 fprintf(USER_STREAM,
77 "WARNING:Collection time do not meet the requirements. "
78 "Supplementary data collection may be required\n");
79 ret = -1;
80 break;
82 AINFO << "ErrorCode.ERROR_CHANNEL_VERIFY_TOPIC_LACK";
83 fprintf(USER_STREAM, "ERROR: Missing topic\n");
84 ret = -1;
85 break;
87 AINFO << "ErrorCode.ERROR_CHANNEL_VERIFY_RATES_ABNORMAL";
88 fprintf(USER_STREAM, "ERROR: Missing topic\n");
89 ret = -1;
90 break;
92 AINFO << "ErrorCode.ERROR_VERIFY_NO_RECORDERS";
93 fprintf(USER_STREAM, "ERROR: Missing record\n");
94 ret = -1;
95 break;
96 default:
97 AINFO << "This branch should never be reached. If this happened, please "
98 "open an issue. code: "
99 << error_code;
100 fprintf(USER_STREAM,
101 "ERROR:This branch should never be reached. If this happened, "
102 "please open an issue\n");
103 break;
104 }
105 return ret;
106}
#define USER_STREAM
#define AINFO
Definition log.h:42

该类的文档由以下文件生成: