A user raised a concern wrt the "Unexpected error" message wording, which seems to imply that there are "expected errors" in LibreOffice [1]. 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 [2]), and improve places *relevant to user-visible messages*. [1] https://ask.libreoffice.org/en/question/187402 [2] https://opengrok.libreoffice.org/search?project=core&full=%22unexpected+error%22
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 > https://opengrok.libreoffice.org/xref/core/svx/uiconfig/ui/ > docrecoverysavedialog.ui?r=a9eb7df6#76 > 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": https://git.libreoffice.org/core/+/6673724ab346f09eb8d403064c56ddca44c89090%5E%21 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: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.