zcancmder_v2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.4 KiB

#include "errorcode.hpp"
#define ERR2STR(code) \
case code: \
return #code;
namespace iflytop {
namespace err {
const char* error2str(int32_t code) {
switch (code) {
ERR2STR(ksucc);
ERR2STR(kfail);
ERR2STR(ksys_error);
ERR2STR(ksys_create_file_error);
ERR2STR(ksys_create_dir_error);
ERR2STR(ksys_open_file_error);
ERR2STR(ksys_open_dir_error);
ERR2STR(ksys_read_file_error);
ERR2STR(ksys_write_file_error);
ERR2STR(ksys_close_file_error);
ERR2STR(ksys_close_dir_error);
ERR2STR(ksys_delete_file_error);
ERR2STR(ksys_delete_dir_error);
ERR2STR(ksys_copy_file_error);
ERR2STR(kce_device_not_zero);
ERR2STR(kce_over_temperature);
ERR2STR(kce_over_voltage);
ERR2STR(kce_param_out_of_range);
ERR2STR(kce_not_found_zero_point);
ERR2STR(kce_not_found_x_zero_point);
ERR2STR(kce_not_found_y_zero_point);
ERR2STR(kce_x_leave_away_zero_point_fail);
ERR2STR(kce_y_leave_away_zero_point_fail);
ERR2STR(kce_operation_not_support);
ERR2STR(kce_device_is_busy);
ERR2STR(kce_device_is_offline);
ERR2STR(kce_break_by_user);
ERR2STR(kce_overtime);
ERR2STR(kce_noack);
ERR2STR(kce_errorack);
ERR2STR(kce_device_offline);
ERR2STR(kce_parse_json_err);
ERR2STR(kce_subdevice_overtime);
ERR2STR(kdbe_user_not_exist);
ERR2STR(kdbe_catch_exception);
ERR2STR(kharde_unfound);
ERR2STR(kre_catch_exception);
ERR2STR(kinteraction_error_passwd_error);
ERR2STR(kinteraction_error_user_not_exist);
ERR2STR(kce_buffer_not_enough);
ERR2STR(kce_cmd_not_found);
ERR2STR(kce_cmd_param_num_error);
ERR2STR(kce_no_such_module);
ERR2STR(kSMTP2_NoError);
ERR2STR(kSMTP2_InitFail);
ERR2STR(kSMTP2_InvalidCmd);
ERR2STR(kSMTP2_InvalidArg);
ERR2STR(kSMTP2_PressureSensorError);
ERR2STR(kSMTP2_OverPressure);
ERR2STR(kSMTP2_LLDError);
ERR2STR(kSMTP2_DeviceNotInit);
ERR2STR(kSMTP2_TipPopError);
ERR2STR(kSMTP2_PumpOverload);
ERR2STR(kSMTP2_TipDrop);
ERR2STR(kSMTP2_CanBusError);
ERR2STR(kSMTP2_InvalidChecksum);
ERR2STR(kSMTP2_EEPROMError);
ERR2STR(kSMTP2_CmdBufferEmpty);
ERR2STR(kSMTP2_CmdBufferOverflow);
ERR2STR(kSMTP2_TipBlock);
ERR2STR(kSMTP2_AirSuction);
ERR2STR(kSMTP2_Bubble);
ERR2STR(kSMTP2_VolumeError);
ERR2STR(kSMTP2_TipAlreadyLoad);
ERR2STR(kSMTP2_TipLoadFail);
default:
break;
}
}
} // namespace err
} // namespace iflytop