FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
taskflow/taskflow/core/error.hpp at master · yhcpp/taskflow · GitHub
yhcpp
taskflow
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
taskflow
/
taskflow
/
core
/
error.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
26 lines (19 loc) · 728 Bytes
Breadcrumbs
taskflow
/
taskflow
/
core
/
error.hpp
Copy path
File metadata and controls
26 lines (19 loc) · 728 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#
pragma
once
#
include
<
iostream
>
#
include
<
sstream
>
#
include
<
exception
>
#
include
"
../utility/stream.hpp
"
namespace
tf
{
//
Procedure: throw_se
//
Throws the system error under a given error code.
template
<
typename
... ArgsT>
//
void throw_se(const char* fname, const size_t line, Error::Code c, ArgsT&&... args) {
void
throw_re
(
const
char
* fname,
const
size_t
line, ArgsT&&... args) {
std::ostringstream oss;
oss <<
"
[
"
<< fname <<
"
:
"
<< line <<
"
]
"
;
//
ostreamize(oss, std::forward<ArgsT>(args)...);
(oss << ... << args);
throw
std::runtime_error
(oss.
str
());
}
}
//
------------------------------------------------------------------------
#
define
TF_THROW
(...) tf::throw_re(__FILE__, __LINE__, __VA_ARGS__);
Back
|
FazBrowse Home
|
New Git URL