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

Error handling #4135

Merged
merged 3 commits into from Jan 13, 2020
Merged

Error handling #4135

merged 3 commits into from Jan 13, 2020

Conversation

Pessimistress
Copy link
Collaborator

For #4134

Change List

  • Do not throw during layer lifecycles: initialize, update, finalize, draw
  • Switch error logging from log.warn to log.error
  • Add onError callback to Deck class (see updated documentation)
  • Test

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 83.355% when pulling 6a588be on x/error-handling into c4aae05 on master.

Copy link
Contributor

@tsherif tsherif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a sensible change.

Long term, I wonder if we could do something like Vulkan's validation layers: https://vulkan-tutorial.com/Drawing_a_triangle/Setup/Validation_layers#page_What-are-validation-layers

The basic idea is Vulkan by default doesn't do any kind of error checking, but you can add these layers when instantiating it that instrument the core functions with various error checks. It would potentially allow us to include more esoteric debug functionality (e.g. Seer support) without weighing down core classes.

@Pessimistress
Copy link
Collaborator Author

@tsherif We do something similar with props validation, based on the debug flag. We could potentially default debug to true in non-production mode?

@Pessimistress Pessimistress changed the title [Discussion] Error handling Error handling Jan 13, 2020
@Pessimistress Pessimistress merged commit 853d972 into master Jan 13, 2020
@Pessimistress Pessimistress deleted the x/error-handling branch January 13, 2020 18:04
chrisgervang pushed a commit that referenced this pull request Jan 31, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants