Bug #2487
[rsb-cpp] No error message when desired plugins are not installed
Status: | Resolved | Start date: | 02/12/2016 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | J. Wienke | % Done: | 100% | |
Category: | C++ | |||
Target version: | rsb-0.13 |
Description
I just figured out that, if the rsb-config wants to load plugins which are not installed, there is no warning or error message from the rsb system. Is this desired? Could you please change that?
Related issues
Associated revisions
Use new plugin configurator API from RSC
Call the required execute method in Factory for the plugin
configurator.
This will now raise an exception in case a requested plugin cannot be
found.
fixes #2487
News: entry for plugin loading exceptions
refs #2487
Reset factoryWhileLoadingPlugins in src/rsb/Factory.cpp
The Factory constructor could be unwound by an exception thrown by the
plugin system, leaving factoryWhileLoadingPlugins pointing to a
half-initialized Factory object. To prevent this, reset
factoryWhileLoadingPlugins to NULL in case an exception is thrown by the
plugin system, then re-throw.
Unfortunately, I cannot come up with a reasonable test for this. The
error would be easy to trigger by doing
setenv("RSB_PLUGINS_CPP_LOAD", "foo", 1);
try { Factory f; } catch (...) {};
Factory f => segmentation fault
but that would require making the Factory constructor public or some
equally ugly friend hackery. sigh
- src/rsb/Factory.cpp (header): updated copyright
(Factory::Factory): reset factoryWhileLoadingPlugins in case an
exception is thrown
History
#1 Updated by J. Wienke about 8 years ago
- Category set to C++
- Target version set to rsb-0.13
#2 Updated by J. Wienke about 8 years ago
Seems to be right. This requires changes in the RSC plugin manager, which doesn't seem to expose this kind of error so far.
#3 Updated by J. Wienke about 8 years ago
- Status changed from New to In Progress
- Assignee set to J. Wienke
The configurator, not the manager swallows this exception.
#4 Updated by J. Wienke about 8 years ago
- % Done changed from 0 to 50
I have a working solution for that but it requires an API change in RSC. Will have to review that on Monday with Jan.
#5 Updated by J. Wienke about 8 years ago
- Blocked by Tasks #2488: Plugin configurator should be able to report missing plugins added
#6 Updated by J. Wienke about 8 years ago
- Status changed from In Progress to Resolved
- % Done changed from 50 to 100
Applied in changeset rsb-cpp|c19edcb46e4d1809c1500ba6c2a53f6b2ff53b2c.