MCPcopy Create free account
hub / github.com/Icinga/icinga2 / GetCurrentContext

Method GetCurrentContext

lib/config/activationcontext.cpp:34–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34ActivationContext::Ptr ActivationContext::GetCurrentContext()
35{
36 std::stack<ActivationContext::Ptr>& astack = GetActivationStack();
37
38 if (astack.empty())
39 BOOST_THROW_EXCEPTION(std::runtime_error("Objects may not be created outside of an activation context."));
40
41 return astack.top();
42}
43
44ActivationScope::ActivationScope(ActivationContext::Ptr context)
45 : m_Context(std::move(context))

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected