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
2fd22c72
Commit
2fd22c72
authored
Feb 09, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make default render functions public
parent
b9e7115d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
7 deletions
+23
-7
libcaf_core/caf/actor_system_config.hpp
libcaf_core/caf/actor_system_config.hpp
+10
-6
libcaf_core/src/actor_system_config.cpp
libcaf_core/src/actor_system_config.cpp
+13
-1
No files found.
libcaf_core/caf/actor_system_config.hpp
View file @
2fd22c72
...
...
@@ -316,6 +316,16 @@ public:
int
(
*
slave_mode_fun
)(
actor_system
&
,
const
actor_system_config
&
);
// -- default error rendering functions --------------------------------------
static
std
::
string
render
(
const
error
&
err
);
static
std
::
string
render_sec
(
uint8_t
,
atom_value
,
const
message
&
);
static
std
::
string
render_exit_reason
(
uint8_t
,
atom_value
,
const
message
&
);
static
std
::
string
render_pec
(
uint8_t
,
atom_value
,
const
message
&
);
protected:
virtual
std
::
string
make_help_text
(
const
std
::
vector
<
message
::
cli_arg
>&
);
...
...
@@ -332,12 +342,6 @@ private:
actor_system_config
&
set_impl
(
string_view
name
,
config_value
value
);
static
std
::
string
render_sec
(
uint8_t
,
atom_value
,
const
message
&
);
static
std
::
string
render_exit_reason
(
uint8_t
,
atom_value
,
const
message
&
);
static
std
::
string
render_pec
(
uint8_t
,
atom_value
,
const
message
&
);
void
extract_config_file_path
(
string_list
&
args
);
};
...
...
libcaf_core/src/actor_system_config.cpp
View file @
2fd22c72
...
...
@@ -318,6 +318,18 @@ timespan actor_system_config::stream_tick_duration() const noexcept {
stream_max_batch_delay
.
count
());
return
timespan
{
ns_count
};
}
std
::
string
actor_system_config
::
render
(
const
error
&
err
)
{
std
::
string
msg
;
switch
(
static_cast
<
uint64_t
>
(
err
.
category
()))
{
case
atom_uint
(
"system"
):
return
render_sec
(
err
.
code
(),
err
.
category
(),
err
.
context
());
case
atom_uint
(
"exit"
):
return
render_exit_reason
(
err
.
code
(),
err
.
category
(),
err
.
context
());
case
atom_uint
(
"parser"
):
return
render_pec
(
err
.
code
(),
err
.
category
(),
err
.
context
());
}
return
"unknown-error"
;
}
std
::
string
actor_system_config
::
render_sec
(
uint8_t
x
,
atom_value
,
const
message
&
xs
)
{
...
...
@@ -335,7 +347,7 @@ std::string actor_system_config::render_exit_reason(uint8_t x, atom_value,
std
::
string
actor_system_config
::
render_pec
(
uint8_t
x
,
atom_value
,
const
message
&
xs
)
{
auto
tmp
=
static_cast
<
exit_reason
>
(
x
);
auto
tmp
=
static_cast
<
pec
>
(
x
);
return
deep_to_string
(
meta
::
type_name
(
"parser_error"
),
tmp
,
meta
::
omittable_if_empty
(),
xs
);
}
...
...
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