MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / to_string

Function to_string

examples/server/httplib.h:1707–1728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1705}
1706
1707inline std::string to_string(const Error error) {
1708 switch (error) {
1709 case Error::Success: return "Success (no error)";
1710 case Error::Connection: return "Could not establish connection";
1711 case Error::BindIPAddress: return "Failed to bind IP address";
1712 case Error::Read: return "Failed to read connection";
1713 case Error::Write: return "Failed to write connection";
1714 case Error::ExceedRedirectCount: return "Maximum redirect count exceeded";
1715 case Error::Canceled: return "Connection handling canceled";
1716 case Error::SSLConnection: return "SSL connection failed";
1717 case Error::SSLLoadingCerts: return "SSL certificate loading failed";
1718 case Error::SSLServerVerification: return "SSL server verification failed";
1719 case Error::UnsupportedMultipartBoundaryChars:
1720 return "Unsupported HTTP multipart boundary characters";
1721 case Error::Compression: return "Compression failed";
1722 case Error::ConnectionTimeout: return "Connection timed out";
1723 case Error::Unknown: return "Unknown";
1724 default: break;
1725 }
1726
1727 return "Invalid";
1728}
1729
1730inline std::ostream &operator<<(std::ostream &os, const Error &obj) {
1731 os << to_string(obj);

Callers 8

httplib.hFile · 0.70
create_socketFunction · 0.70
make_range_headerFunction · 0.70
apply_rangesMethod · 0.70
process_requestMethod · 0.70
ClientImplMethod · 0.70
write_requestMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected