* Include original exception in ComponentManagerException Signed-off-by: Martijn Buijs <martijn.buijs@gmail.com> * Update rclcpp_components/src/component_manager.cpp Co-authored-by: tomoya <Tomoya.Fujita@sony.com> Signed-off-by: Martijn Buijs <martijn.buijs@gmail.com> Co-authored-by: tomoya <Tomoya.Fujita@sony.com> Co-authored-by: Martijn Buijs <Martijn.buijs@gmail.com> Co-authored-by: tomoya <Tomoya.Fujita@sony.com>
This commit is contained in:
parent
b67fa594f8
commit
cb1b32ee15
1 changed files with 5 additions and 0 deletions
|
@ -196,6 +196,11 @@ ComponentManager::OnLoadNode(
|
||||||
|
|
||||||
try {
|
try {
|
||||||
node_wrappers_[node_id] = factory->create_node_instance(options);
|
node_wrappers_[node_id] = factory->create_node_instance(options);
|
||||||
|
} catch (const std::exception & ex) {
|
||||||
|
// In the case that the component constructor throws an exception,
|
||||||
|
// rethrow into the following catch block.
|
||||||
|
throw ComponentManagerException(
|
||||||
|
"Component constructor threw an exception: " + std::string(ex.what()));
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
// In the case that the component constructor throws an exception,
|
// In the case that the component constructor throws an exception,
|
||||||
// rethrow into the following catch block.
|
// rethrow into the following catch block.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue