Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does this call strerror(e->errorCode()) ? (class ErrnoException)
If so then yes this looks fine.
Or do you want makeErrnoException() instead of makeStringException() ?
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.
I think this is probably right. In this case e will be a IOSException or an IErrnoException. (I think they are only different for windows - the first for operating system errors, the second for errors from the c library first...!)
When e->errorMessage() is called it will call strerror() - so the message will include the description. I think it cannot call makeErrnoException() because it may not be an errno.
There is similar code in copyFileSection() ~995 which adds the error message and creates an OsException - which I think will lead to the message being duplicated, but I didn't fix since it would be benign.
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.
ok, then looks fine.