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 warning if name not found in get_scanner_from_name #1522

Merged
merged 2 commits into from
Oct 6, 2024

Conversation

robbietuk
Copy link
Collaborator

@robbietuk robbietuk commented Oct 6, 2024

Changes in this pull request

Logs a warning message if scanner name is not present in the list of scanner name available.

Testing performed

Related issues

Fixes #1520

Checklist before requesting a review

  • I have performed a self-review of my code
  • [] I have added docstrings/doxygen in line with the guidance in the developer guide
  • [] I have implemented unit tests that cover any new or modified functionality (if applicable)
  • The code builds and runs on my machine
  • [] documentation/release_XXX.md has been updated with any functionality change (if applicable)

Copy link
Collaborator

@KrisThielemans KrisThielemans left a comment

Choose a reason for hiding this comment

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

ok. minimum change.

I guess really it should throw an error or so, but in that case, we'd have to catch it in various places presumably.

src/buildblock/Scanner.cxx Outdated Show resolved Hide resolved
@robbietuk
Copy link
Collaborator Author

It should be an error but I don't know where/how return new Scanner(Unknown_scanner); is ever used. C++ string concatenation change is good. Feel free to squash merge.

@KrisThielemans KrisThielemans merged commit efa201d into UCL:master Oct 6, 2024
8 of 9 checks passed
@robbietuk robbietuk deleted the get_scanner_from_name_warning branch October 7, 2024 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Core dump while trying to access Scanner object created for an unknown scanner
2 participants