popsift icon indicating copy to clipboard operation
popsift copied to clipboard

[request] using exception for error handling

Open Azhng opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. Currently, Popsift directly calls exit() function (example) when it encounters failures and directly logs into stderr. Our application directly links to popsift and this results in our application crashing. This is quite difficult to handle since it would require the application to directly intercept the exit() call.

Describe the solution you'd like Instead of directly calling exit(), it would be amazing to throw an exception so the application can gracefully catch it.

I'd be happy to send in a patch for this.

Azhng avatar Jun 14 '22 16:06 Azhng

Thanks, feel free to submit a PR, it is indeed better to have a gracious way to end after an error that can be caught from another project using the library.

simogasp avatar Jun 14 '22 20:06 simogasp

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 02 '22 03:11 stale[bot]