MCPcopy Create free account
hub / github.com/christophhart/HISE / throwIf

Method throwIf

hi_scripting/scripting/scriptnode/api/DspNetwork.cpp:2051–2077  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2049}
2050
2051void DeprecationChecker::throwIf(DeprecationId id)
2052{
2053#if USE_BACKEND
2054 if (notOk)
2055 return;
2056
2057 if (!check(id))
2058 {
2059 try
2060 {
2061 Error::throwError(Error::ErrorCode::DeprecatedNode, (int)id);
2062 }
2063 catch (Error& e)
2064 {
2065 auto nodeTree = cppgen::ValueTreeIterator::findParentWithType(v, PropertyIds::Node);
2066 auto nId = nodeTree[PropertyIds::ID].toString();
2067
2068 if (auto node = n->getNodeWithId(nId))
2069 {
2070 n->getExceptionHandler().addError(node, e);
2071 }
2072 }
2073
2074 notOk = true;
2075 }
2076#endif
2077}
2078
2079bool DeprecationChecker::check(DeprecationId id)
2080{

Callers

nothing calls this directly

Calls 5

throwErrorFunction · 0.85
getNodeWithIdMethod · 0.80
checkFunction · 0.50
toStringMethod · 0.45
addErrorMethod · 0.45

Tested by

no test coverage detected