MCPcopy Create free account
hub / github.com/SmingHub/Sming / getErrorString

Function getErrorString

Sming/Components/ssl/BearSsl/BrError.cpp:91–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89#undef XX
90
91String getErrorString(int error)
92{
93 if(error < 0) {
94 error = -error;
95 }
96 if(error >= BR_ERR_SEND_FATAL_ALERT) {
97 auto alert = Alert(error - BR_ERR_SEND_FATAL_ALERT);
98 return F("SEND_") + getAlertString(alert);
99 } else if(error >= BR_ERR_RECV_FATAL_ALERT) {
100 auto alert = Alert(error - BR_ERR_RECV_FATAL_ALERT);
101 return F("RECV_") + getAlertString(alert);
102 } else {
103 auto s = String(errorMap[error]);
104 return s ?: F("Unknown_") + String(error);
105 }
106}
107
108Alert getAlert(int error)
109{

Callers 2

runUntilMethod · 0.70
getErrorStringMethod · 0.70

Calls 4

AlertEnum · 0.85
getAlertStringFunction · 0.85
FFunction · 0.50
StringClass · 0.50

Tested by

no test coverage detected