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

Document possible assertion cases. #25

Open
ypiguet-epfl opened this issue Jun 12, 2017 · 3 comments
Open

Document possible assertion cases. #25

ypiguet-epfl opened this issue Jun 12, 2017 · 3 comments

Comments

@ypiguet-epfl
Copy link
Contributor

ypiguet-epfl commented Jun 12, 2017

What about throwing exceptions instead of calling abort? See dashel/dashel-win32.cpp and dashel/dashel-posix.cpp

@stephanemagnenat
Copy link
Member

stephanemagnenat commented Jun 12, 2017

If critical system resources necessary for the functioning of Dashel, such as the termination pipes, cannot be acquired, the program should quit. These will happen only in case of system severely over-loaded to the point of being totally dysfunctional.

Similarly, if there is a critical bug in the implementation of a system call, we should abort as we do not know the state of the system.

@ypiguet-epfl
Copy link
Contributor Author

Then it should be clearly documented, so that potential users of the library can make an informed decision. There are applications where a communication error shouldn't be fatal.

@stephanemagnenat stephanemagnenat changed the title Exception Document possible assertion cases. Jun 12, 2017
@stephanemagnenat
Copy link
Member

Yes I agree that this design choice should be documented. I thus relabel the issue as "enhancement" and change the title.

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