Skip to content

Conversation

@bsneed
Copy link
Contributor

@bsneed bsneed commented Nov 30, 2022

let fileEnding = "],\"sentAt\":\"\(sentAt)\",\"writeKey\":\"\(writeKey)\"}"
do {
try outputStream.write(fileEnding)
try outputStream.close()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance this should be in a finally block?

Copy link
Contributor Author

@bsneed bsneed Nov 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No because it throws and we'd need to have another identical catch in the finally block. ... and it's all synchronous anyway.

@bsneed bsneed merged commit 9c4cb9b into main Dec 1, 2022
@bsneed bsneed deleted the bsneed/output_crash branch December 1, 2022 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crashes observed in OutputFileStream due to EXC_BAD_ACCESS.

4 participants