office-gobmx/comphelper
Justin Luth 91d1cd8687 tdf#81522 comphelper: just ignore disposed obj on save
Even if xObj.is(), it might be disposed, and then
getCurrentState() will raise an exception,
resulting in an ERRCODE_IO_GENERAL,
and failing to save the entire document.

Although it might not seem good to just ignore an error
on save, the general attitude in that function already
leans that way. In fact, the other ::StoreChildren()
wraps the entire for-loop in a try-catch.
Also, in this function a bad xPersist also breaks
out of the loop and returns a false.
So wrapping the entire xObj in an "ignore if errors"
try-catch seems reasonable to me in this instance.

The alternative is not to allow the user to save at all,
which is much worse, especially since there is nothing
he can do to fix the problem.

Change-Id: I0372245563735ae7ac7976bf7ce6060e57a5eb87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99129
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Justin Luth <justin_luth@sil.org>
2020-07-22 17:27:55 +02:00
..
inc/pch update pches 2020-07-12 12:20:05 +02:00
qa Upcoming improved loplugin:staticanonymous -> redundantstatic: comphelper 2020-06-30 22:58:53 +02:00
source tdf#81522 comphelper: just ignore disposed obj on save 2020-07-22 17:27:55 +02:00
util comphelper: create instances with uno constructors 2020-07-05 12:35:37 +02:00
CppunitTest_comphelper_ifcontainer.mk
CppunitTest_comphelper_parallelsort_test.mk
CppunitTest_comphelper_syntaxhighlight_test.mk
CppunitTest_comphelper_test.mk
CppunitTest_comphelper_threadpool_test.mk
CppunitTest_comphelper_variadictemplates_test.mk
IwyuFilter_comphelper.yaml replace usage of blacklist with excludelist for IWYU 2020-07-10 02:03:40 +02:00
JunitTest_comphelper_complex.mk
Library_comphelper.mk loplugin:unusedmethods 2020-07-21 08:31:20 +02:00
Makefile
Module_comphelper.mk
README
StaticLibrary_windows_process.mk

Helper functionality for implementing UNO components

...anything not generic/mature enough to end up in URE's stable interface at
cppuhelper etc.