Skip to content

Conversation

@firewave
Copy link
Collaborator

@firewave firewave commented Dec 8, 2025

No description provided.

@firewave
Copy link
Collaborator Author

firewave commented Dec 8, 2025

Best reviewed with whitespaces ignored.

// Check normal tokens
checkNormalTokens(tokenizer, analyzerInformation.get(), currentConfig);
} catch (const InternalError &e) {
ErrorMessage errmsg = ErrorMessage::fromInternalError(e, nullptr, file.spath());
Copy link
Owner

Choose a reason for hiding this comment

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

If we have this InternalError then do we want to abort the loop? Maybe current configuration leads to an InternalError but another configuration is successfully checked?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do not understand what you mean. Could you elaborate a bit?

I also did not change the behavior. It was a try-catch inside another try-catch with the same catch handlers.

Copy link
Owner

@danmar danmar Dec 8, 2025

Choose a reason for hiding this comment

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

This try you removed is inside a for loop that starts at line 1088:

      for (const std::string &currCfg : configurations) {
      ....
          try {
              code
          } catch ...
      ....
      }

if the code would throw an exception then that would have been handled in the loop and the loop could continue to process other configurations..
after your changes it seems to me that the exception is handled below the loop and that the loop is aborted as a consequence.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ugh. You are right, of course. But it seems we are lacking testing for this. I was curious why none of the test results changed and still would have added a test which triggers it.

The TerminateException is still redundant though.

So I will restore the InternalError and add tests and more documentation. A follow-up will introduce some noexcept (mostly driven by upcoming clang-tidy improvements).

@firewave firewave marked this pull request as draft December 9, 2025 16:02
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 9, 2025

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.

2 participants