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
0c5ed145
Commit
0c5ed145
authored
Jan 18, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1021
parents
75b75015
333c5256
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
libcaf_core/src/actor_system_config.cpp
libcaf_core/src/actor_system_config.cpp
+6
-2
libcaf_core/src/error.cpp
libcaf_core/src/error.cpp
+2
-4
No files found.
libcaf_core/src/actor_system_config.cpp
View file @
0c5ed145
...
...
@@ -431,7 +431,8 @@ timespan actor_system_config::stream_tick_duration() const noexcept {
return
timespan
{
ns_count
};
}
std
::
string
actor_system_config
::
render
(
const
error
&
err
)
{
std
::
string
msg
;
if
(
!
err
)
return
"none"
;
switch
(
static_cast
<
uint64_t
>
(
err
.
category
()))
{
case
atom_uint
(
"system"
):
return
render_sec
(
err
.
code
(),
err
.
category
(),
err
.
context
());
...
...
@@ -439,8 +440,11 @@ std::string actor_system_config::render(const error& err) {
return
render_exit_reason
(
err
.
code
(),
err
.
category
(),
err
.
context
());
case
atom_uint
(
"parser"
):
return
render_pec
(
err
.
code
(),
err
.
category
(),
err
.
context
());
default:
return
deep_to_string
(
meta
::
type_name
(
"error"
),
err
.
code
(),
err
.
category
(),
meta
::
omittable_if_empty
(),
err
.
context
());
}
return
"unknown-error"
;
}
std
::
string
actor_system_config
::
render_sec
(
uint8_t
x
,
atom_value
,
...
...
libcaf_core/src/error.cpp
View file @
0c5ed145
...
...
@@ -18,6 +18,7 @@
#include "caf/error.hpp"
#include "caf/actor_system_config.hpp"
#include "caf/config.hpp"
#include "caf/deep_to_string.hpp"
#include "caf/deserializer.hpp"
...
...
@@ -166,10 +167,7 @@ error error::apply(const inspect_fun& f) {
}
std
::
string
to_string
(
const
error
&
x
)
{
if
(
!
x
)
return
"none"
;
return
deep_to_string
(
meta
::
type_name
(
"error"
),
x
.
code
(),
x
.
category
(),
meta
::
omittable_if_empty
(),
x
.
context
());
return
actor_system_config
::
render
(
x
);
}
}
// namespace caf
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