-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Check and log some errors. #250
Check and log some errors. #250
Conversation
@@ -329,6 +330,7 @@ - (void)backgroundThread_CompressLogFile:(DDLogFileInfo *)logFile | |||
if (writeLength < 0) | |||
{ | |||
error = YES; | |||
streamError = [outputStream streamError]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could just remove error
now and just check !streamError
in the enclosing while
condition.
Nice! |
Yes, you're right that we don't need both error and streamError. Let me re-submit this one -- I have another PR coming which will be impacted too. |
Thank you for all the pull requests. I'll try to leave the more sensitive ones however for @dvor . |
Log the streamError whenever we fail to write during compression, and log any failures when removing the original file or cleaning up the temporary file after compression failed.
Re-submitted. This version just uses a single NSError* error variable instead of the BOOL error and NSError* streamError. It also re-uses the NSError* in the cleanup instead of having a separate one. |
Thank you! |
…eam-error Check and log some errors.
Log the streamError whenever we fail to write during compression,
and log any failures when removing the original file or cleaning up
the temporary file after compression failed.