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

Add ErrorContextBuilder #38

Closed
sleberknight opened this issue Oct 29, 2020 · 4 comments · Fixed by #41
Closed

Add ErrorContextBuilder #38

sleberknight opened this issue Oct 29, 2020 · 4 comments · Fixed by #41
Assignees
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Milestone

Comments

@sleberknight
Copy link
Member

This class is a builder for ErrorContext instances.

This issue depends on completion of:

@sleberknight sleberknight added the new feature A new feature such as a new class, method, package, group of classes, etc. label Oct 29, 2020
@sleberknight sleberknight added this to the 0.1.0 milestone Oct 29, 2020
@sleberknight
Copy link
Member Author

Can the entry point be something like ErrorContext.builder() which would be a a default method in the interface and would return an instance of ErrorContextBuilder?

@sleberknight
Copy link
Member Author

e.g. in ErrorContext:

default ErrorContextBuilder builder() {
    return new ErrorContextBuilder();
}

@sleberknight
Copy link
Member Author

Alternatively, we could create a method in ErrorContextBuilder that is not named builder (to avoid the rather awkward ErrorContextBuilder.builder()).

e.g. ErrorContextBuilder.newInstance()

@chrisrohr
Copy link
Contributor

Because there is builder in the name, use the newInstance() version

@sleberknight sleberknight self-assigned this Oct 30, 2020
sleberknight added a commit that referenced this issue Oct 30, 2020
* Add ErrorContextBuilder for building ErrorContext objects
* Change ApplicationErrorJdbc#dataStoreTypeOf to use the isH2DataStore
  method since it does the exact same thing that this method was doing
  (i.e. make it DRY)
* Add dataStoreType arg to ErrorContextUtilities#checkCommonArguments
* Update Jdbi3ErrorContext to supply dataStoreType to call to
  checkCommonArguments
* Fix TODOs in Javadocs in ApplicationError and ErrorContext

Fixes #38
chrisrohr pushed a commit that referenced this issue Oct 31, 2020
* Add ErrorContextBuilder

* Add ErrorContextBuilder for building ErrorContext objects
* Change ApplicationErrorJdbc#dataStoreTypeOf to use the isH2DataStore
  method since it does the exact same thing that this method was doing
  (i.e. make it DRY)
* Add dataStoreType arg to ErrorContextUtilities#checkCommonArguments
* Update Jdbi3ErrorContext to supply dataStoreType to call to
  checkCommonArguments
* Fix TODOs in Javadocs in ApplicationError and ErrorContext

Fixes #38

* Add verification that the health check was NOT registered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants