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
fbb8244f
Commit
fbb8244f
authored
Oct 25, 2017
by
Gabi Melman
Committed by
GitHub
Oct 25, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #533 from manuel-schiller/patch-1
rethrow unwind exception
parents
69e6af0b
039b34e8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
include/spdlog/common.h
include/spdlog/common.h
+6
-0
include/spdlog/details/logger_impl.h
include/spdlog/details/logger_impl.h
+5
-4
No files found.
include/spdlog/common.h
View file @
fbb8244f
...
...
@@ -42,6 +42,12 @@
#define SPDLOG_DEPRECATED
#endif
#ifdef __linux__
#include <cxxabi.h>
#define SPDLOG_CATCH_ALL catch (abi::__forced_unwind&) { _err_handler("Unknown exception"); throw; } catch (...)
#else // __linux__
#define SPDLOG_CATCH_ALL catch (...)
#endif // __linux__
#include "spdlog/fmt/fmt.h"
...
...
include/spdlog/details/logger_impl.h
View file @
fbb8244f
...
...
@@ -11,7 +11,6 @@
#include <memory>
#include <string>
// create logger with given name, sinks and the default pattern formatter
// all other ctors will call this one
template
<
class
It
>
...
...
@@ -78,7 +77,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const char* fmt, const Ar
{
_err_handler
(
ex
.
what
());
}
catch
(...)
SPDLOG_CATCH_ALL
{
_err_handler
(
"Unknown exception"
);
}
...
...
@@ -98,7 +97,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const char* msg)
{
_err_handler
(
ex
.
what
());
}
catch
(...)
SPDLOG_CATCH_ALL
{
_err_handler
(
"Unknown exception"
);
}
...
...
@@ -119,7 +118,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const T& msg)
{
_err_handler
(
ex
.
what
());
}
catch
(...)
SPDLOG_CATCH_ALL
{
_err_handler
(
"Unknown exception"
);
}
...
...
@@ -571,3 +570,5 @@ inline const std::vector<spdlog::sink_ptr>& spdlog::logger::sinks() const
{
return
_sinks
;
}
#undef SPDLOG_CATCH_ALL
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