Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
RobotAPI
Commits
1bd08a12
Commit
1bd08a12
authored
2 years ago
by
Fabian Tërnava
Browse files
Options
Downloads
Patches
Plain Diff
better exception message in visitors
parent
c4cca621
No related branches found
No related tags found
1 merge request
!332
Rename ARON numeric primitive typenames
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/libraries/aron/core/data/visitor/RecursiveVisitor.h
+21
-3
21 additions, 3 deletions
...otAPI/libraries/aron/core/data/visitor/RecursiveVisitor.h
with
21 additions
and
3 deletions
source/RobotAPI/libraries/aron/core/data/visitor/RecursiveVisitor.h
+
21
−
3
View file @
1bd08a12
...
...
@@ -57,7 +57,17 @@ namespace armarx::aron::data
virtual
void
visitDouble
(
Input
&
element
)
{};
virtual
void
visitBool
(
Input
&
element
)
{};
virtual
void
visitString
(
Input
&
element
)
{};
virtual
void
visitUnknown
(
Input
&
element
)
{
throw
error
::
AronException
(
__PRETTY_FUNCTION__
,
"Unknown type in visitor."
);
}
virtual
void
visitUnknown
(
Input
&
element
)
{
if
(
!
element
)
{
throw
error
::
AronException
(
__PRETTY_FUNCTION__
,
"Unknown type in visitor. The element was NULL."
);
}
else
{
throw
error
::
AronException
(
__PRETTY_FUNCTION__
,
"Unknown type in visitor. The element was set but descriptor was undefined."
);
}
}
virtual
~
RecursiveVisitor
()
=
default
;
};
...
...
@@ -108,8 +118,16 @@ namespace armarx::aron::data
virtual
void
visitBool
(
DataInput
&
elementData
,
TypeInput
&
elementType
)
{};
virtual
void
visitString
(
DataInput
&
elementData
,
TypeInput
&
elementType
)
{};
virtual
void
visitAnyObject
(
DataInput
&
elementData
,
TypeInput
&
elementType
)
{};
virtual
void
visitUnknown
(
DataInput
&
elementData
,
TypeInput
&
elementType
)
{
throw
error
::
AronException
(
__PRETTY_FUNCTION__
,
"Unknown type in visitor."
);
virtual
void
visitUnknown
(
DataInput
&
elementData
,
TypeInput
&
elementType
)
{
if
(
!
elementData
)
{
throw
error
::
AronException
(
__PRETTY_FUNCTION__
,
"Unknown type in visitor. The element was NULL."
);
}
else
{
throw
error
::
AronException
(
__PRETTY_FUNCTION__
,
"Unknown type in visitor. The element was set but descriptor was undefined."
);
}
}
virtual
~
RecursiveTypedVisitor
()
=
default
;
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment