Skip to content

Tokenizer: provide TokenList in constructor #7468

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

firewave
Copy link
Collaborator

No description provided.

@firewave firewave marked this pull request as draft April 15, 2025 15:22
@firewave firewave marked this pull request as ready for review April 15, 2025 15:24
@firewave firewave marked this pull request as draft April 15, 2025 15:25
Comment on lines -1224 to +1233
ErrorMessage errmsg = ErrorMessage::fromInternalError(e, &tokenizer.list, file.spath());
ErrorMessage errmsg = ErrorMessage::fromInternalError(e, nullptr, file.spath());
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since TokenList might throw InternalError it seem strange that we pass that object into the exception handling. Also it was no longer available.

Comment on lines +1200 to +1203
} catch (const InternalError &e) {
ErrorMessage errmsg = ErrorMessage::fromInternalError(e, &tokenizer.list, file.spath());
mErrorLogger.reportErr(errmsg);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The multiple layers of exception handling seem excessive. I think it is possible to clean this up a bit but that requires test coverage first.

@firewave

This comment was marked as resolved.

@firewave firewave marked this pull request as ready for review April 23, 2025 18:49
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.

1 participant