Mercurial > hg > vampy
comparison vampy-main.cpp @ 84:980e092d7ee2
If one plugin fails, continue trying the others - don't just give up
author | Chris Cannam |
---|---|
date | Thu, 10 Jan 2019 15:36:32 +0000 |
parents | e2bb3cf7adf1 |
children | 39c5f644152d |
comparison
equal
deleted
inserted
replaced
83:ef4989f33648 | 84:980e092d7ee2 |
---|---|
351 haveScannedPlugins=true; | 351 haveScannedPlugins=true; |
352 } | 352 } |
353 | 353 |
354 DSTREAM << "Accessing adapter index: " << index << " (adapters: " << adapters.size() << ")" << endl; | 354 DSTREAM << "Accessing adapter index: " << index << " (adapters: " << adapters.size() << ")" << endl; |
355 | 355 |
356 if (index<adapters.size()) { | 356 while (index < adapters.size()) { |
357 | 357 |
358 const VampPluginDescriptor *tmp = adapters[index]->getDescriptor(); | 358 const VampPluginDescriptor *tmp = adapters[index]->getDescriptor(); |
359 | 359 |
360 if (adapters[index]->failed()) { | 360 if (adapters[index]->failed()) { |
361 cerr << "\nERROR: [in vampGetPluginDescriptor] Removing adapter of: \n'" | 361 cerr << "\nERROR: [in vampGetPluginDescriptor] Removing adapter of: \n'" |
362 << adapters[index]->getPlugKey() << "'\n" | 362 << adapters[index]->getPlugKey() << "'\n" |
363 << "The plugin has failed to construct. Hint: Check __init__() function." << endl; | 363 << "The plugin has failed to construct. Hint: Check __init__() function." << endl; |
364 pyExtensionManager.deleteModuleName(adapters[index]->getPlugKey()); | 364 pyExtensionManager.deleteModuleName(adapters[index]->getPlugKey()); |
365 delete adapters[index]; | 365 delete adapters[index]; |
366 adapters.erase(adapters.begin()+index); | 366 adapters.erase(adapters.begin()+index); |
367 return 0; | 367 continue; |
368 } | 368 } |
369 | 369 |
370 return tmp; | 370 return tmp; |
371 | 371 } |
372 } else return 0; | 372 |
373 return 0; | |
373 } | 374 } |
374 | 375 |
375 | 376 |
376 | 377 |
377 | 378 |