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

#2256 Add new Exception and change message to show Module #2253

Conversation

benjaperez1983
Copy link
Contributor

@benjaperez1983 benjaperez1983 commented Jun 6, 2024

Fixes #2256

Description

Changed the way we display the message for this exception by adding the module and building block information to it.

Type of change

Please mark relevant options with an x in the brackets.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires documentation changes (link at least one user or developer documentation issue):
  • Algorithm update - updates algorithm documentation/questions/answers etc.
  • Other (please describe):

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Integration tests
  • Unit tests
  • Manual tests
  • No tests required

Reviewer checklist

Mark everything that needs to be checked before merging the PR.

  • Check if the code is well documented
  • Check if the behavior is what is expected
  • Check if the code is well tested
  • Check if the code is readable and well formatted
  • Additional checks (document below if any)
  • Check if documentation update issue(s) are created if the option This change requires a documentation update above is selected

Screenshots (if appropriate):

image

Questions (if appropriate):

@benjaperez1983 benjaperez1983 requested a review from rwmcintosh June 6, 2024 13:30
@benjaperez1983 benjaperez1983 self-assigned this Jun 6, 2024
@rwmcintosh rwmcintosh changed the title #1280 Add new Exception and chang message to show Module #2256 Add new Exception and chang message to show Module Jun 7, 2024
@rwmcintosh rwmcintosh requested review from msevestre and Yuri05 June 7, 2024 12:53
Copy link
Member

@msevestre msevestre left a comment

Choose a reason for hiding this comment

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

@rwmcintosh Thoughts? Not fond of generating lots of specific exception, especially without parameters

@rwmcintosh
Copy link
Member

@rwmcintosh Thoughts? Not fond of generating lots of specific exception, especially without parameters

Yeah, we looked at this one together and it's just that we'd be passing the building block and/or module and/or the string down into where the exception is thrown (it's a couple calls lower in the stack) just in case the parent container can't be found.

This way, we just throw this specific exception and catch it where the domain objects are being held so that we can create a meaningful message.

@msevestre
Copy link
Member

Ok so no reason for me to make this exception public. Can it be declared internal , even with the file itself ? This should not be used anywhere else

Also is base() required ?

@rwmcintosh
Copy link
Member

Yeah good idea. Nested class even.

@benjaperez1983 benjaperez1983 changed the title #2256 Add new Exception and chang message to show Module #2256 Add new Exception and change message to show Module Jun 13, 2024
@msevestre msevestre merged commit 7e8d6df into develop Jun 14, 2024
1 check passed
@msevestre msevestre deleted the 1280-add-module-name-to-the-error-message-when-parent-container-not-found branch June 14, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Verified
Development

Successfully merging this pull request may close these issues.

Add module name to the error message when parent container not found
3 participants