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

Function GetUnderstandableError

lib/methods/ifwapichecktask.cpp:37–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35REGISTER_FUNCTION_NONCONST(Internal, IfwApiCheck, &IfwApiCheckTask::ScriptFunc, "checkable:cr:producer:resolvedMacros:useResolvedMacros");
36
37static const char* GetUnderstandableError(const std::exception& ex)
38{
39 auto se (dynamic_cast<const boost::system::system_error*>(&ex));
40
41 if (se && se->code() == boost::asio::error::operation_aborted) {
42 return "Timeout exceeded";
43 }
44
45 return ex.what();
46}
47
48// Note: If DoIfwNetIo returns due to an error, the plugin output of the specified CheckResult (cr) will always be set,
49// and if it was successful, the cr exit status, plugin state and performance data (if any) will also be overridden.

Callers 1

DoIfwNetIoFunction · 0.85

Calls 1

whatMethod · 0.45

Tested by

no test coverage detected