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

Update error message in writableSegment #398

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Conversation

whyoleg
Copy link
Contributor

@whyoleg whyoleg commented Oct 10, 2024

During implementation for support of kotlinx-io in cryptography-kotlin at one point I've started to receive the error about unexpected capacity, but it was not really informative. The reason for this was, that I haven't handled the case with output of zero size here.
It would be nice to have the error message more clear on what's wrong, when using UnsafeBufferOperations.writeToTail

@whyoleg whyoleg requested a review from fzhinkin October 10, 2024 16:26
@whyoleg whyoleg self-assigned this Oct 10, 2024
@fzhinkin fzhinkin merged commit e358b77 into develop Oct 10, 2024
1 check passed
@fzhinkin
Copy link
Collaborator

Thanks for improving the message!

@whyoleg whyoleg deleted the update-error-message branch October 16, 2024 14:15
Egorand added a commit to Egorand/kotlinx-io that referenced this pull request Nov 14, 2024
* 'develop' of github.com:Kotlin/kotlinx-io:
  Publish Segment.size and Segment.remainingCapacity (Kotlin#409)
  Generate JPMS modules (Kotlin#406)
  Document empty bytestring factory (Kotlin#396)
  Update error message in `writableSegment` (Kotlin#398)
  Improve documentation (Kotlin#395)
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.

2 participants