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
59f117d3
Commit
59f117d3
authored
Jun 09, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add make_error for parser error code
parent
648112ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
libcaf_core/caf/detail/parser/ec.hpp
libcaf_core/caf/detail/parser/ec.hpp
+4
-0
libcaf_core/src/ec.cpp
libcaf_core/src/ec.cpp
+6
-0
No files found.
libcaf_core/caf/detail/parser/ec.hpp
View file @
59f117d3
...
...
@@ -20,6 +20,8 @@
#include <cstdint>
#include "caf/fwd.hpp"
namespace
caf
{
namespace
detail
{
namespace
parser
{
...
...
@@ -53,6 +55,8 @@ enum class ec : uint8_t {
exponent_overflow
,
};
error
make_error
(
ec
code
);
const
char
*
to_string
(
ec
x
);
}
// namespace parser
...
...
libcaf_core/src/ec.cpp
View file @
59f117d3
...
...
@@ -18,6 +18,8 @@
#include "caf/detail/parser/ec.hpp"
#include "caf/error.hpp"
namespace
{
constexpr
const
char
*
tbl
[]
=
{
...
...
@@ -42,6 +44,10 @@ namespace caf {
namespace
detail
{
namespace
parser
{
error
make_error
(
ec
code
)
{
return
{
static_cast
<
uint8_t
>
(
code
),
atom
(
"parser"
)};
}
const
char
*
to_string
(
ec
x
)
{
return
tbl
[
static_cast
<
uint8_t
>
(
x
)];
}
...
...
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