-
Notifications
You must be signed in to change notification settings - Fork 33
[WIP] [Core] Propose minimal error handling methodology #519
Copy link
Copy link
Open
Labels
coreCore infrastructure - protocol relatedCore infrastructure - protocol relateddiscussionIt has a related DiscussionIt has a related Discussiontoolingtooling to support development, testing et altooling to support development, testing et al
Milestone
Description
Objective
Consistent and ubiquitous error handling methodology. Concerns:
- Testing
- Asserting specific error cases using high-level APIs (i.e. not using regular expressions to match error messages, etc.)
- Logging
- Debugging
- Convenient access to stack traces (e.g. print stack trace of errors on
DEBUGlevel)
- Convenient access to stack traces (e.g. print stack trace of errors on
- Debugging
- Errors sent over the network
- Can't leak metadata (e.g. peer's shouldn't see a detailed DB error from one another)
Origin Document
Goals
- Improve accuracy and maintainability of error case test code.
- Improve developer experience while debugging.
- Improve readability and consistency in error handling logic across the codebase.
- Ensure consistency in error presentation.
- Ensure errors sent over the network can't leak metadata.
Deliverable
- Proposal for a minimal, coherent error framework which addresses the outlined concerns
- Defines "proper presentation" for:
- logging
- end-user (i.e. normal operation, not debugging)
- debugging
- Defines "proper presentation" for:
- Documentation of a minimal, example application of the methodology which covers each concern (see "Testing Methodology", below).
Non-goals / Non-deliverables
- Changing existing error handling code.
Testing Methodology
- Write an simple, example test which asserts for a specific error.
- Ensure proper presentation when running tests.
- Write a simple, example script which generates and logs the error but then exits normally.
- Ensure proper presentation when logging.
- Update the script to make the error fatal.
- Ensure proper presentation while debugging.
Creator: @bryanchriswhite
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreCore infrastructure - protocol relatedCore infrastructure - protocol relateddiscussionIt has a related DiscussionIt has a related Discussiontoolingtooling to support development, testing et altooling to support development, testing et al
Type
Projects
Status
Backlog
