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

netconvert should not write a network on error #14470

Closed
behrisch opened this issue Mar 5, 2024 · 4 comments
Closed

netconvert should not write a network on error #14470

behrisch opened this issue Mar 5, 2024 · 4 comments

Comments

@behrisch
Copy link
Contributor

behrisch commented Mar 5, 2024

Currently an exception on writing will create an invalid network. All error checks should probably be done before writing. It seems to affect one check for non-negative speeds and one for the endOffset, see tests/netconvert/function/railway/bidi_endOffset_invalid

@namdre
Copy link
Contributor

namdre commented Mar 5, 2024

it might be easier to delete the network on error (code and performance wise)

@namdre namdre self-assigned this Mar 7, 2024
@namdre namdre closed this as completed in 5917695 Mar 7, 2024
namdre added a commit that referenced this issue Mar 7, 2024
@behrisch
Copy link
Contributor Author

behrisch commented Mar 7, 2024

You are too fast ;-) I thought checking beforehand would be better because then the check would not need to be repeated for every output.

@namdre
Copy link
Contributor

namdre commented Mar 7, 2024

checking beforehand slows down writing though. Also, I'm not aware of other writers throwing process errors.

@behrisch
Copy link
Contributor Author

behrisch commented Mar 7, 2024

No, they will simply write faulty networks ;-(

behrisch added a commit that referenced this issue Mar 19, 2024
This reverts commit 5917695.
behrisch added a commit that referenced this issue Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants