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

Change exception handling to be on by default? #94

Closed
rpavlik opened this issue Aug 2, 2019 · 1 comment

Comments

@rpavlik
Copy link
Contributor

commented Aug 2, 2019

@zheqiMicrosoft looking for your input here.

I'm documenting and cleaning up some things, and I realized I think I made my optional exception handling too dangerous. There's a define XRLOADER_ENABLE_EXCEPTION_HANDLING that you must enable except in two conditions (excerpt from in-progress note in docs):

  • Due to a project policy, you're using a custom standard-library build
    that has exception throwing disabled.
    (The loader itself does not throw any exceptions but it uses standard
    library functionality that may throw.)
  • You're developing or debugging the loader and want exceptions to go
    uncaught to trigger a debugger.

However, if somebody doesn't use CMake, it's easy to forget to fail to define something, so it seems like the better, safer default is to catch exceptions unless XRLOADER_DISABLE_EXCEPTION_HANDLING is defined.

I imagine for your uses, you could probably add that define in to your alternate build system, but I wanted to find out for sure before I made a PR.

@rpavlik rpavlik referenced this issue Aug 2, 2019
@RafaelCintron

This comment has been minimized.

Copy link
Member

commented Aug 2, 2019

@rpavlik , this is fine with us.

@rpavlik rpavlik closed this in #102 Aug 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.