Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-core
Commits
5f892304
Commit
5f892304
authored
Oct 21, 2019
by
Joseph Mirabel
Browse files
Improve some error messages.
parent
4a01d20c
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugin.cc
View file @
5f892304
...
...
@@ -56,7 +56,8 @@ namespace hpp {
void
*
library
=
dlopen
(
lib
.
c_str
(),
RTLD_NOW
);
error
=
dlerror
();
if
(
error
!=
NULL
)
{
hppDout
(
error
,
"Error loading library "
<<
lib
<<
": "
<<
error
);
throw
std
::
runtime_error
(
"Error loading library "
+
lib
+
": "
+
error
);
return
false
;
}
if
(
library
==
NULL
)
{
...
...
@@ -67,11 +68,13 @@ namespace hpp {
PluginFunction_t
function
=
reinterpret_cast
<
PluginFunction_t
>
(
dlsym
(
library
,
"createProblemSolverPlugin"
));
error
=
dlerror
();
if
(
error
!=
NULL
)
{
hppDout
(
error
,
"Error loading library "
<<
lib
<<
":
\n
"
<<
error
);
throw
std
::
runtime_error
(
"Error loading library "
+
lib
+
": "
+
error
);
return
false
;
}
if
(
function
==
NULL
)
{
hppDout
(
error
,
"Symbol createProblemSolverPlugin of (correctly loaded) library "
<<
lib
<<
" is NULL."
);
throw
std
::
runtime_error
(
"Symbol createProblemSolverPlugin of "
"(correctly loaded) library "
+
lib
+
" is NULL."
);
return
false
;
}
...
...
src/problem-solver.cc
View file @
5f892304
...
...
@@ -529,7 +529,7 @@ namespace hpp {
if
(
robot_
)
constraints_
->
addConstraint
(
constraint
);
else
hppDout
(
error
,
"Cannot add constraint while robot is not set"
);
throw
std
::
logic_
error
(
"Cannot add constraint while robot is not set"
);
}
void
ProblemSolver
::
resetConstraints
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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