Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
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
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
Libraries
spdlog
Commits
65506136
Commit
65506136
authored
Jun 13, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
solve issue #724
parent
2989e998
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
include/spdlog/common.h
include/spdlog/common.h
+9
-11
No files found.
include/spdlog/common.h
View file @
65506136
...
...
@@ -11,7 +11,7 @@
#include <atomic>
#include <chrono>
#include <
exception
>
#include <
stdexcept
>
#include <functional>
#include <initializer_list>
#include <memory>
...
...
@@ -148,28 +148,26 @@ namespace os {
std
::
string
errno_str
(
int
err_num
);
}
}
// namespace details
class
spdlog_ex
:
public
std
::
exception
class
spdlog_ex
:
public
std
::
runtime_error
{
public:
explicit
spdlog_ex
(
std
::
string
msg
)
:
_msg
(
std
::
move
(
msg
))
spdlog_ex
(
const
std
::
string
&
msg
)
:
runtime_error
(
msg
)
{
fmt
::
format_to
(
buf_
,
"{}"
,
msg
);
}
spdlog_ex
(
const
std
::
string
&
msg
,
int
last_errno
)
spdlog_ex
(
const
std
::
string
&
msg
,
int
last_errno
)
:
runtime_error
(
msg
)
{
fmt
::
memory_buffer
buf
;
fmt
::
format_system_error
(
buf
,
last_errno
,
msg
);
_msg
=
fmt
::
to_string
(
buf
);
fmt
::
format_system_error
(
buf_
,
last_errno
,
msg
);
}
const
char
*
what
()
const
SPDLOG_NOEXCEPT
override
{
return
_msg
.
c_str
();
return
fmt
::
to_string
(
buf_
)
.
c_str
();
}
private:
std
::
string
_msg
;
fmt
::
memory_buffer
buf_
;
};
//
...
...
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