Skip to content

Commit 1ee9a9c

Browse files
committed
Handle unknown exception
1 parent 1f2cea1 commit 1ee9a9c

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

include/control_filters/exponential_filter.hpp

+5
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ bool ExponentialFilter<T>::configure()
9292
parameter_handler_.reset();
9393
return false;
9494
}
95+
catch (...) {
96+
RCLCPP_ERROR((*logger_), "Caught unknown exception while configuring Exponential filter");
97+
parameter_handler_.reset();
98+
return false;
99+
}
95100
}
96101
parameters_ = parameter_handler_->get_params();
97102

include/control_filters/low_pass_filter.hpp

+5
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,11 @@ bool LowPassFilter<T>::configure()
118118
parameter_handler_.reset();
119119
return false;
120120
}
121+
catch (...) {
122+
RCLCPP_ERROR((*logger_), "Caught unknown exception while configuring LowPass filter");
123+
parameter_handler_.reset();
124+
return false;
125+
}
121126
}
122127
parameters_ = parameter_handler_->get_params();
123128
lpf_ = std::make_shared<control_toolbox::LowPassFilter<T>>(

include/control_filters/rate_limiter.hpp

+5
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ bool RateLimiter<T>::configure()
9595
parameter_handler_.reset();
9696
return false;
9797
}
98+
catch (...) {
99+
RCLCPP_ERROR((*logger_), "Caught unknown exception while configuring Rate Limiter filter");
100+
parameter_handler_.reset();
101+
return false;
102+
}
98103
}
99104
parameters_ = parameter_handler_->get_params();
100105
limiter = std::make_shared<control_toolbox::RateLimiter<T>>(

0 commit comments

Comments
 (0)