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

opt: continue to load dictionaries when some dictionaries throw exception. #2180

Merged
merged 8 commits into from
Feb 20, 2025

Conversation

xiaoyifang
Copy link
Owner

No description provided.

@@ -228,8 +232,6 @@ void loadDictionaries( QWidget * parent,
QMessageBox::critical( parent,
QCoreApplication::translate( "LoadDictionaries", "Error loading dictionaries" ),
QString::fromUtf8( loadDicts.getExceptionText().c_str() ) );
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here should show all errors.

Copy link
Owner Author

Choose a reason for hiding this comment

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

do not want to change too much code. :-)

Copy link
Collaborator

@shenlebantongying shenlebantongying Feb 19, 2025

Choose a reason for hiding this comment

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

Error handling should be religious, and silently ignoring errors is sinful 😅.

I think this only need to append the original exceptionText to a QStringList, then call QStringList::join('\n') here.

BTW, I think there should be a systematical way to report dict errors and warnings back to users.

Copy link
Owner Author

Choose a reason for hiding this comment

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

This can be left from another PR.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@xiaoyifang xiaoyifang merged commit a40a746 into staged Feb 20, 2025
11 of 12 checks passed
@xiaoyifang xiaoyifang deleted the opt/partial-loading-dict branch February 20, 2025 06:00
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