MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / close

Method close

MonaCore/sources/HTTP/HTTPWriter.cpp:31–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void HTTPWriter::close(const Exception& ex) {
32 int code(500);
33 switch(ex.code()) {
34 case Exception::FILE:
35 code = 404;
36 break;
37 case Exception::PERMISSION:
38 code = 403;
39 break;
40 case Exception::APPLICATION:
41 code = 503;
42 break;
43 default: break;
44 }
45 _lastError.assign(ex.error());
46 close(code);
47}
48
49void HTTPWriter::close(Int32 code) {
50 if (code < 0)

Callers 1

receiveMethod · 0.45

Calls 4

codeMethod · 0.80
errorMethod · 0.80
writeErrorMethod · 0.45
killMethod · 0.45

Tested by

no test coverage detected