Skip to content

Quick question re: after-open file handler #3207

Answered by tt4g
Lord-Kamina asked this question in Q&A
Discussion options

You must be logged in to vote

spdlog does not check for errors after the callback call:

if (!os::fopen_s(&fd_, fname, mode)) {
if (event_handlers_.after_open) {
event_handlers_.after_open(filename_, fd_);
}
return;
}

Handling of errors that occur in the callback should be handled in the callback.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Lord-Kamina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants