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

Catch exceptions in main()? #22

Open
elfring opened this issue Mar 23, 2020 · 2 comments
Open

Catch exceptions in main()? #22

elfring opened this issue Mar 23, 2020 · 2 comments

Comments

@elfring
Copy link

elfring commented Mar 23, 2020

I expect that exception handling is usually supported by a C++ program. I wonder why your function “main” does not contain corresponding try and catch instructions so far.

How do you think about recommendations by Matthew Wilson in an article?

Would you like to adjust the implementation if you consider effects for uncaught/unhandled exceptions?

@eidelen
Copy link
Owner

eidelen commented Mar 24, 2020

Hi Markus,
Thank you for your recommendations. I know about exception handling in C++, and I used it here and there. I feel that in my everyday programming I apply it far too less.
Rather than just catching the exception in the main, I would prefer to implement a proper exception handling throughout the whole application - starting deep down in code where they actually occur.
Would you be willing to participate in that work?
Adrian

@elfring
Copy link
Author

elfring commented Mar 25, 2020

I would like to achieve a bit also in such a software area.
The application of C++ exceptions can eventually be improved further.

How should a production-quality main() function look like?

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

No branches or pull requests

2 participants