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

Method removeError

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

Source from the content-addressed store, hash-verified

2141}
2142
2143void ScriptnodeExceptionHandler::removeError(NodeBase* n, Error::ErrorCode errorToRemove)
2144{
2145 customErrorMessage = {};
2146
2147 bool didSomething = false;
2148
2149 for (int i = 0; i < items.size(); i++)
2150 {
2151 if(items[i].node == nullptr)
2152 {
2153 items.remove(i--);
2154 didSomething = true;
2155 continue;
2156 }
2157
2158 auto e = items[i].error.error;
2159
2160 auto isErrorCode = e == errorToRemove ||
2161 (errorToRemove == Error::numErrorCodes &&
2162 e != Error::ErrorCode::DeprecatedNode &&
2163 e != Error::ErrorCode::IllegalBypassConnection);
2164
2165 if ((n == nullptr || (items[i].node == n)) && isErrorCode)
2166 {
2167 items.remove(i--);
2168 didSomething = true;
2169 }
2170 }
2171
2172 auto lastItem = items.getLast();
2173
2174 if(didSomething)
2175 errorBroadcaster.sendMessage(sendNotificationAsync, lastItem.node, lastItem.error);
2176}
2177
2178String ScriptnodeExceptionHandler::getErrorMessage(Error e)
2179{

Callers 15

prepareMethod · 0.80
reinitFaustWrapperMethod · 0.80
buttonClickedMethod · 0.80
checkValidContextMethod · 0.80
prepareNodesMethod · 0.80
prepareMethod · 0.80
resetErrorMethod · 0.80
checkValidClonesMethod · 0.80
prepareMethod · 0.80

Calls 4

sizeMethod · 0.45
removeMethod · 0.45
getLastMethod · 0.45
sendMessageMethod · 0.45

Tested by 1

prepareTestMethod · 0.64