已合并
【PR】: add error manager C callback wrappers #858
KenChow创建于 3月13日
【PR】: add error manager C callback wrappers #858
已合并
共 3 个文件变更+251-0
| @@ -282,4 +282,65 @@ class ErrorManager { | |||
| 282 | std::vector<ErrorItem> error_message_process_; // 进程粒度,所有的errmsg存到同一个vector | 282 | std::vector<ErrorItem> error_message_process_; // 进程粒度,所有的errmsg存到同一个vector |
| 283 | std::vector<ErrorItem> warning_messages_process_; // 进程粒度,所有的warning msg存到同一个vector | 283 | std::vector<ErrorItem> warning_messages_process_; // 进程粒度,所有的warning msg存到同一个vector |
| 284 | }; | 284 | }; |
| 285 | + | ||
| 286 | + | ||
| 287 | +extern "C" { | ||
| 288 | + | ||
| 289 | + | ||
| 290 | + | ||
| 291 | + | ||
| 292 | + | ||
| 293 | + | ||
| 294 | + | ||
| 295 | + | ||
| 296 | + | ||
| 297 | + | ||
| 298 | + | ||
| 299 | + | ||
| 300 | + | ||
| 301 | + | ||
| 302 | + | ||
| 303 | + | ||
| 304 | + | ||
| 305 | + | ||
| 306 | + | ||
| 307 | + | ||
| 308 | + | ||
| 309 | + | ||
| 310 | + | ||
| 311 | + | ||
| 312 | + | ||
| 313 | + | ||
| 314 | + | ||
| 315 | + | ||
| 316 | + | ||
| 317 | + | ||
| 318 | + | ||
| 319 | + | ||
| 320 | + | ||
| 321 | + | ||
| 322 | + | ||
| 323 | + | ||
| 324 | + | ||
| 325 | + | ||
| 326 | +GE_FUNC_HOST_VISIBILITY GE_FUNC_DEV_VISIBILITY | ||
| 327 | +int32_t RegisterFormatErrorMessageForC(const char *error_msg, unsigned long error_msg_len); | ||
| 328 | + | ||
| 329 | +GE_FUNC_HOST_VISIBILITY GE_FUNC_DEV_VISIBILITY | ||
| 330 | +int32_t ReportPredefinedErrMsgForC(const char *error_code, const char **key, const char **value, unsigned long arg_num); | ||
| 331 | + | ||
| 332 | + | ||
| 333 | +GE_FUNC_HOST_VISIBILITY GE_FUNC_DEV_VISIBILITY | ||
| 334 | +int32_t ReportInnerErrMsgForC(const char *file_name, const char *func, uint32_t line, | ||
| 335 | + const char *error_code, const char *format, ...) FORMAT_PRINTF(5, 6); | ||
| 336 | + | ||
| 337 | +GE_FUNC_HOST_VISIBILITY GE_FUNC_DEV_VISIBILITY | ||
| 338 | +int32_t ReportInnerErrMsgForC(const char *file_name, const char *func, uint32_t line, | ||
| 339 | + const char *error_code, const char *format, ...); | ||
| 340 | + | ||
| 341 | + | ||
| 342 | + | ||
| 343 | +} | ||
| 344 | + | ||
| 345 | + | ||
| 285 | 346 | ||