MCPcopy Create free account
hub / github.com/cutelyst/cutelyst / errorTest

Method errorTest

tests/teststatusmessage.cpp:28–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27 C_ATTR(errorTest, :Local :AutoArgs)
28 void errorTest(Context *c, const QString &statusKey, const QString &errorKey)
29 {
30 qDebug() << "---- stash" << c->stash();
31 c->response()->setBody(c->stash(errorKey).toString());
32 }
33
34 C_ATTR(status, :Local :AutoArgs)
35 void status(Context *c) { c->response()->setBody(StatusMessage::status(c, u"SM:status"_s)); }

Callers

nothing calls this directly

Calls 3

stashMethod · 0.80
responseMethod · 0.80
setBodyMethod · 0.60

Tested by

no test coverage detected