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
9c1b9ca4
Commit
9c1b9ca4
authored
Feb 20, 2013
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added `exit_reason::as_string`
parent
cf4655f2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
0 deletions
+55
-0
CMakeLists.txt
CMakeLists.txt
+1
-0
cppa.files
cppa.files
+1
-0
cppa/exit_reason.hpp
cppa/exit_reason.hpp
+2
-0
src/exit_reason.cpp
src/exit_reason.cpp
+51
-0
No files found.
CMakeLists.txt
View file @
9c1b9ca4
...
...
@@ -116,6 +116,7 @@ set(LIBCPPA_SRC
src/empty_tuple.cpp
src/event_based_actor.cpp
src/exception.cpp
src/exit_reason.cpp
src/factory.cpp
src/fd_util.cpp
src/fiber.cpp
...
...
cppa.files
View file @
9c1b9ca4
...
...
@@ -291,3 +291,4 @@ unit_testing/test_uniform_type.cpp
unit_testing/test_yield_interface.cpp
cppa/memory_cached_mixin.hpp
unit_testing/test.cpp
src/exit_reason.cpp
cppa/exit_reason.hpp
View file @
9c1b9ca4
...
...
@@ -82,6 +82,8 @@ static constexpr std::uint32_t remote_link_unreachable = 0x00101;
*/
static
constexpr
std
::
uint32_t
user_defined
=
0x10000
;
const
char
*
as_string
(
std
::
uint32_t
value
);
}
}
// namespace cppa::exit_reason
#endif // CPPA_EXIT_REASON_HPP
src/exit_reason.cpp
0 → 100644
View file @
9c1b9ca4
/******************************************************************************\
* ___ __ *
* /\_ \ __/\ \ *
* \//\ \ /\_\ \ \____ ___ _____ _____ __ *
* \ \ \ \/\ \ \ '__`\ /'___\/\ '__`\/\ '__`\ /'__`\ *
* \_\ \_\ \ \ \ \L\ \/\ \__/\ \ \L\ \ \ \L\ \/\ \L\.\_ *
* /\____\\ \_\ \_,__/\ \____\\ \ ,__/\ \ ,__/\ \__/.\_\ *
* \/____/ \/_/\/___/ \/____/ \ \ \/ \ \ \/ \/__/\/_/ *
* \ \_\ \ \_\ *
* \/_/ \/_/ *
* *
* Copyright (C) 2011-2013 *
* Dominik Charousset <dominik.charousset@haw-hamburg.de> *
* *
* This file is part of libcppa. *
* libcppa is free software: you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation, either version 3 of the License *
* or (at your option) any later version. *
* *
* libcppa is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* See the GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with libcppa. If not, see <http://www.gnu.org/licenses/>. *
\******************************************************************************/
#include "cppa/exit_reason.hpp"
namespace
cppa
{
namespace
exit_reason
{
namespace
{
constexpr
const
char
*
s_names_table
[]
=
{
"not_exited"
,
"normal"
,
"unhandled_exception"
,
"unallowed_function_call"
,
"unhandled_sync_failure"
,
"unhandled_sync_timeout"
};
}
const
char
*
as_string
(
std
::
uint32_t
value
)
{
if
(
value
<=
unhandled_sync_timeout
)
return
s_names_table
[
value
];
if
(
value
==
remote_link_unreachable
)
return
"remote_link_unreachable"
;
if
(
value
>=
user_defined
)
return
"user_defined"
;
return
"illegal_exit_reason"
;
}
}
}
// namespace cppa::exit_reason
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