Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
307bec1a
Commit
307bec1a
authored
May 11, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not throw exceptions in `to_string`
parent
20c5b7d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
libcaf_core/caf/detail/tuple_vals.hpp
libcaf_core/caf/detail/tuple_vals.hpp
+2
-1
libcaf_core/src/string_serialization.cpp
libcaf_core/src/string_serialization.cpp
+8
-3
No files found.
libcaf_core/caf/detail/tuple_vals.hpp
View file @
307bec1a
...
...
@@ -131,7 +131,8 @@ class tuple_vals : public message_data {
if
(
et
.
first
!=
0
)
{
return
numbered_type_names
[
et
.
first
-
1
];
}
return
uniform_typeid
(
*
et
.
second
)
->
name
();
auto
uti
=
uniform_typeid
(
*
et
.
second
,
true
);
return
uti
?
uti
->
name
()
:
"-invalid-"
;
}
uint16_t
type_nr_at
(
size_t
pos
)
const
override
{
...
...
libcaf_core/src/string_serialization.cpp
View file @
307bec1a
...
...
@@ -513,9 +513,14 @@ namespace detail {
string
to_string_impl
(
const
void
*
what
,
const
uniform_type_info
*
utype
)
{
std
::
ostringstream
osstr
;
string_serializer
strs
(
osstr
);
strs
.
begin_object
(
utype
);
utype
->
serialize
(
what
,
&
strs
);
strs
.
end_object
();
try
{
strs
.
begin_object
(
utype
);
utype
->
serialize
(
what
,
&
strs
);
strs
.
end_object
();
}
catch
(
std
::
runtime_error
&
)
{
return
"---not-serializable---"
;
}
return
osstr
.
str
();
}
...
...
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