MCPcopy Create free account
hub / github.com/comaps/comaps / DebugPrint

Function DebugPrint

libs/editor/osm_auth.cpp:397–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

395}
396
397string DebugPrint(OsmOAuth::Response const & code)
398{
399 string r;
400 switch (code.first)
401 {
402 case OsmOAuth::HTTP::OK: r = "OK"; break;
403 case OsmOAuth::HTTP::BadXML: r = "BadXML"; break;
404 case OsmOAuth::HTTP::BadAuth: r = "BadAuth"; break;
405 case OsmOAuth::HTTP::Redacted: r = "Redacted"; break;
406 case OsmOAuth::HTTP::NotFound: r = "NotFound"; break;
407 case OsmOAuth::HTTP::WrongMethod: r = "WrongMethod"; break;
408 case OsmOAuth::HTTP::Conflict: r = "Conflict"; break;
409 case OsmOAuth::HTTP::Gone: r = "Gone"; break;
410 case OsmOAuth::HTTP::PreconditionFailed: r = "PreconditionFailed"; break;
411 case OsmOAuth::HTTP::URITooLong: r = "URITooLong"; break;
412 case OsmOAuth::HTTP::TooMuchData: r = "TooMuchData"; break;
413 default:
414 // No data from server in case of NetworkError.
415 if (code.first < 0)
416 return "NetworkError " + strings::to_string(code.first);
417 r = "HTTP " + strings::to_string(code.first);
418 }
419 return r + ": " + code.second;
420}
421
422} // namespace osm

Callers 6

FetchSessionIdMethod · 0.70
LogoutUserMethod · 0.70
LoginUserPasswordMethod · 0.70
LoginSocialMethod · 0.70
FetchRequestTokenMethod · 0.70
FinishAuthorizationMethod · 0.70

Calls 1

to_stringFunction · 0.85

Tested by

no test coverage detected