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

Provide way to return error to caller instead of calling abort() on failed assertions #41

Open
adsr opened this issue May 19, 2020 · 1 comment

Comments

@adsr
Copy link

adsr commented May 19, 2020

Aborting is fine for debug but in production it is usually undesirable to crash. For example, on failed malloc, an error code or NULL can be returned to the caller.

@hnes
Copy link
Owner

hnes commented May 27, 2020

Aborting is fine for debug but in production it is usually undesirable to crash.

On some occasions "let it crash" idea is very convenient and powerful. For example, in the case of libaco, the memory for creating coroutine is usually not the bottleneck of resource usage. But I do admit that there still exist some occasion that needs to handle such resource-draining.

Thanks a lot for this proposal, @adsr 👍

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