diff options
-rw-r--r-- | dbaccess/source/filter/hsqldb/hsqlimport.cxx | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/dbaccess/source/filter/hsqldb/hsqlimport.cxx b/dbaccess/source/filter/hsqldb/hsqlimport.cxx index 83b291ccf745..260ec8665d0a 100644 --- a/dbaccess/source/filter/hsqldb/hsqlimport.cxx +++ b/dbaccess/source/filter/hsqldb/hsqlimport.cxx @@ -305,8 +305,10 @@ void HsqlImporter::importHsqlDatabase() } catch (SQLException& ex) { - if (!pException) - pException.reset(new SQLException{ ex }); + // chain errors and keep going + if (pException) + ex.NextException <<= *pException; + pException.reset(new SQLException{ std::move(ex) }); } auto statements = parser.getCreateStatements(); @@ -327,8 +329,9 @@ void HsqlImporter::importHsqlDatabase() } catch (SQLException& ex) { - if (!pException) - pException.reset(new SQLException{ ex }); + if (pException) + ex.NextException <<= *pException; + pException.reset(new SQLException{ std::move(ex) }); } } @@ -342,8 +345,9 @@ void HsqlImporter::importHsqlDatabase() } catch (SQLException& ex) { - if (!pException) - pException.reset(new SQLException{ ex }); + if (pException) + ex.NextException <<= *pException; + pException.reset(new SQLException{ std::move(ex) }); } } @@ -357,12 +361,12 @@ void HsqlImporter::importHsqlDatabase() } catch (SQLException& ex) { - if (!pException) - pException.reset(new SQLException{ ex }); + if (pException) + ex.NextException <<= *pException; + pException.reset(new SQLException{ std::move(ex) }); } } - // show first error occurred if (pException) { SAL_WARN("dbaccess", "Error during migration"); |