Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
roscontrol_sot
Commits
a24367df
Commit
a24367df
authored
Jan 29, 2020
by
Joseph Mirabel
Committed by
olivier stasse
Jan 30, 2020
Browse files
Fix exception handling.
parent
317d0adb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/roscontrol-sot-controller.cpp
View file @
a24367df
...
...
@@ -1056,18 +1056,15 @@ void RCSotController::update(const ros::Time &, const ros::Duration &period) {
}
else
accumulated_time_
+=
periodInSec
;
}
catch
(
std
::
exception
const
&
exc
)
{
std
::
cerr
<<
"Failure happened during one_iteration evaluation: "
<<
"std_exception"
<<
std
::
endl
;
std
::
cerr
<<
"Use gdb on this line together with gdb to "
<<
"investiguate the problem: "
<<
std
::
endl
;
std
::
cerr
<<
__FILE__
<<
" "
<<
__LINE__
<<
std
::
endl
;
throw
exc
;
ROS_ERROR_STREAM
(
"Failure happened during one_iteration evaluation: "
<<
exc
.
what
()
<<
"
\n
Use gdb to investiguate the problem
\n
"
<<
__FILE__
<<
":"
<<
__LINE__
);
throw
;
}
catch
(...)
{
std
::
cerr
<<
"Failure happened during one_iteration evaluation: "
<<
"unknown exception"
<<
std
::
endl
;
std
::
cerr
<<
"Use gdb on this line together with gdb to "
<<
"investiguate the problem: "
<<
std
::
endl
;
std
::
cerr
<<
__FILE__
<<
" "
<<
__LINE__
<<
std
::
endl
;
ROS_ERROR_STREAM
(
"Failure happened during one_iteration evaluation: "
"unknown exception
\n
Use gdb to investiguate the problem
\n
"
<<
__FILE__
<<
":"
<<
__LINE__
);
throw
;
}
}
else
{
/// Update the sensors.
...
...
@@ -1075,7 +1072,8 @@ void RCSotController::update(const ros::Time &, const ros::Duration &period) {
try
{
sotController_
->
setupSetSensors
(
sensorsIn_
);
}
catch
(
std
::
exception
&
e
)
{
throw
e
;
ROS_ERROR_STREAM
(
"RCSotController::update: "
<<
e
.
what
());
throw
;
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment