Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added additional information for error handler #2048

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove inner try catch in SPDLOG_LOGGER_CATCH
The fmt::format call should not throw formatting the exception message and the source code location.
  • Loading branch information
D-r-P-3-p-p-3-r committed Aug 17, 2021
commit 0d10e21c2fee9142da39d03d4507ff8554349e37
9 changes: 1 addition & 8 deletions include/spdlog/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,7 @@
{ \
if(location.filename) \
{ \
try \
{ \
err_handler_(fmt::format("{} [{}({})]", ex.what(), location.filename, location.line)); \
} \
catch (const std::exception &ex) \
{ \
err_handler_(ex.what()); \
} \
err_handler_(fmt::format("{} [{}({})]", ex.what(), location.filename, location.line)); \
} \
else \
{ \
Expand Down