MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / error

Function error

src/http.cpp:77–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77static int error(std::string& errors, const char* msg, const char* x = nullptr, const char* y = nullptr, int z = 0) {
78 static const size_t buffer_size = 512;
79 char buffer[buffer_size] = {};
80 snprintf(buffer, buffer_size, msg, x, y, z);
81 if (errno) {
82 perror(buffer);
83 } else {
84 fprintf(stderr, "%s\n", buffer);
85 }
86 errors += std::string(msg) + '\n';
87 return -1;
88}
89
90static void flushBuffer(const char* buffer, size_t start, int& end, std::string& file) {
91 file += std::string(buffer + start, end - start);

Callers 4

httpMethod · 0.85
readOrThrowMethod · 0.85
mmapMethod · 0.85
transferMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected