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

Function getErrorString

Sming/Components/ssl/Axtls/AxError.cpp:69–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67#undef XX
68
69String getErrorString(int error)
70{
71 String s;
72
73 // X509 error ?
74 if(error < SSL_X509_OFFSET) {
75 s = String(x509ErrorMap[error - SSL_X509_OFFSET]);
76 } else if(error < SSL_CLOSE_NOTIFY && error > SSL_ERROR_CONN_LOST) {
77 auto alert = Alert(-error);
78 s = getAlertString(alert);
79 } else {
80 s = String(errorMap[error]);
81 }
82 return s ?: F("Unknown_") + String(error);
83}
84
85Alert getAlert(int error)
86{

Callers 1

getErrorStringMethod · 0.70

Calls 4

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

Tested by

no test coverage detected