diff options
author | Tobia De Koninck <LEDfan@users.noreply.github.com> | 2020-01-03 08:50:37 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-02-03 11:15:56 +0100 |
commit | 055ae9b2cd9f37f854d3c8c4f7e2051cd116fa53 (patch) | |
tree | a0e1abd57a7ccea6295f5291fe3d2f08712d879d /apps | |
parent | 97508f69ec5046c3876912b80530c7a164ce49f9 (diff) | |
download | nextcloud-server-055ae9b2cd9f37f854d3c8c4f7e2051cd116fa53.tar.gz nextcloud-server-055ae9b2cd9f37f854d3c8c4f7e2051cd116fa53.zip |
Catch \Error in Transfer::restoreShares
This makes the command more fault tolerant. An \Error can happen when
e.g. the owner of a share is null.
If we don't catch this, the restore process will stop in an unknown
state.
Signed-off-by: Tobia De Koninck <LEDfan@users.noreply.github.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/lib/Service/OwnershipTransferService.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php index 3dc55615c95..b130910e25b 100644 --- a/apps/files/lib/Service/OwnershipTransferService.php +++ b/apps/files/lib/Service/OwnershipTransferService.php @@ -286,7 +286,7 @@ class OwnershipTransferService { } } catch (\OCP\Files\NotFoundException $e) { $output->writeln('<error>Share with id ' . $share->getId() . ' points at deleted file, skipping</error>'); - } catch (\Exception $e) { + } catch (\Throwable $e) { $output->writeln('<error>Could not restore share with id ' . $share->getId() . ':' . $e->getTraceAsString() . '</error>'); } $progress->advance(); |