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

don't use exceptions when non-exceptional methods are available #389

Merged
merged 6 commits into from
Mar 18, 2022

Conversation

mgeplf
Copy link
Contributor

@mgeplf mgeplf commented Mar 1, 2022

No description provided.

@mgeplf mgeplf added the WIP Work in Progress label Mar 1, 2022
@@ -163,67 +227,4 @@ breadth_iterator Morphology::breadth_end() const {
return breadth_iterator();
}

SomaType getSomaType(long unsigned int num_soma_points) {
try {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to anonymous namespace and replaced the try w/ a switch

return morphio::SOMA_SINGLE_POINT;
case 2:
return morphio::SOMA_UNDEFINED;
default:;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is how clang-format wanted this; FYI

Copy link
Member

Choose a reason for hiding this comment

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

One could fold the return below into the switch, but maybe some other linting thing then complains?

@mgeplf mgeplf removed the WIP Work in Progress label Mar 16, 2022
@mgeplf mgeplf merged commit bd2e18e into master Mar 18, 2022
@mgeplf mgeplf deleted the fix-exceptions branch March 18, 2022 14:18
@matz-e matz-e mentioned this pull request Nov 25, 2022
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.

3 participants