Skip to content

Conversation

@perlpunk
Copy link
Member

If yaml_emitter_dump failed, the emitter might be in a broken state and have leftover states/events.
yaml_emitter_close calls yaml_emitter_emit which will try to emit those events, so we should return early.

The recommended thing to do for library users is to abort when yaml_emitter_dump fails, but it's easy to add a check here as well.

@perlpunk
Copy link
Member Author

CI failure addressed by #293

@perlpunk perlpunk force-pushed the check-emitter-error branch 2 times, most recently from e584022 to 635a691 Compare May 7, 2024 14:07
If yaml_emitter_dump failed, the emitter might be in a broken
state and have leftover states/events.
yaml_emitter_close calls yaml_emitter_emit which will
try to emit those events, so we should return early.

The recommended thing to do for library users is to abort
when yaml_emitter_dump fails, but it's easy to add a check
here as well.
@perlpunk perlpunk force-pushed the check-emitter-error branch from 635a691 to 3a0d3a2 Compare May 20, 2024 13:31
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.

1 participant