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
8ca1d84a
Commit
8ca1d84a
authored
Nov 12, 2017
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed catch(..) from the codebase. Catch only std::exception
parent
63d7c646
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
34 deletions
+5
-34
include/spdlog/common.h
include/spdlog/common.h
+0
-7
include/spdlog/details/async_log_helper.h
include/spdlog/details/async_log_helper.h
+1
-5
include/spdlog/details/async_logger_impl.h
include/spdlog/details/async_logger_impl.h
+1
-5
include/spdlog/details/logger_impl.h
include/spdlog/details/logger_impl.h
+3
-17
No files found.
include/spdlog/common.h
View file @
8ca1d84a
...
...
@@ -42,13 +42,6 @@
#define SPDLOG_DEPRECATED
#endif
#if defined(__linux__) && !defined(__ANDROID__)
#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 "fmt/fmt.h"
namespace
spdlog
...
...
include/spdlog/details/async_log_helper.h
View file @
8ca1d84a
...
...
@@ -279,11 +279,7 @@ inline void spdlog::details::async_log_helper::worker_loop()
catch
(
const
std
::
exception
&
ex
)
{
_err_handler
(
ex
.
what
());
}
catch
(...)
{
_err_handler
(
"Unknown exception"
);
}
}
}
if
(
_worker_teardown_cb
)
_worker_teardown_cb
();
...
...
include/spdlog/details/async_logger_impl.h
View file @
8ca1d84a
...
...
@@ -97,9 +97,5 @@ inline void spdlog::async_logger::_sink_it(details::log_msg& msg)
catch
(
const
std
::
exception
&
ex
)
{
_err_handler
(
ex
.
what
());
}
catch
(...)
{
_err_handler
(
"Unknown exception"
);
}
}
}
include/spdlog/details/logger_impl.h
View file @
8ca1d84a
...
...
@@ -76,11 +76,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const char* fmt, const Ar
catch
(
const
std
::
exception
&
ex
)
{
_err_handler
(
ex
.
what
());
}
SPDLOG_CATCH_ALL
{
_err_handler
(
"Unknown exception"
);
}
}
}
template
<
typename
...
Args
>
...
...
@@ -96,12 +92,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const char* msg)
catch
(
const
std
::
exception
&
ex
)
{
_err_handler
(
ex
.
what
());
}
SPDLOG_CATCH_ALL
{
_err_handler
(
"Unknown exception"
);
}
}
}
template
<
typename
T
>
...
...
@@ -117,11 +108,7 @@ inline void spdlog::logger::log(level::level_enum lvl, const T& msg)
catch
(
const
std
::
exception
&
ex
)
{
_err_handler
(
ex
.
what
());
}
SPDLOG_CATCH_ALL
{
_err_handler
(
"Unknown exception"
);
}
}
}
...
...
@@ -571,4 +558,3 @@ 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