A user raised a concern wrt the "Unexpected error" message wording, which seems to imply that there are "expected errors" in LibreOffice . While there are actually "expected errors" (exceptions expected to be generated in many scenarios, and handled gracefully in the code), those are implementation detail, and that detail is not something what could be of interest to a user.
The message should be improved. Search for "unexpected error" using grep in the codebase (or use opengrok ), and improve places *relevant to user-visible messages*.
I would like to work on this.
From what I could understand, I have to find all the files which gives "unexpected error" message to user. Files which just logs "expected error" message are not concerned here. Then I have to improve the message.
Can you please elaborate what does it mean to improve the messages?
Do I have to find the source of the error, and see what condition might result into "unexpected error"? But I think there can be multiple condition for a single file which can trigger "unexpected error", since "unexpected error" are not defined.
Or do I have to change message to specify what is the consequence of error, e.g. this message https://opengrok.libreoffice.org/xref/core/svx/uiconfig/ui/docrecoverysavedialog.ui?r=a9eb7df6#76
or "an error occurred" message will do?
(In reply to Shivansh from comment #1)
> Can you please elaborate what does it mean to improve the messages?
> Do I have to find the source of the error, and see what condition might
> result into "unexpected error"? But I think there can be multiple condition
> for a single file which can trigger "unexpected error", since "unexpected
> error" are not defined.
> Or do I have to change message to specify what is the consequence of error,
> e.g. this message
> or "an error occurred" message will do?
The main task is to avoid word "unexpected" in the message (so in some places, the latter variant would do). Of course, it is better to check each site individually, if the message might be expanded in a useful way - e.g., if we know that it prevented opening file in this place, then say so; if we know what a user can best do to troubleshoot, then mention that, etc - but that's, again, a site-by-site task.
DarkByt31 committed a patch related to this issue.
It has been pushed to "master":
tdf#124197 Improve "Unexpected error" user-visible error message wording
It will be available in 6.3.0.
The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.