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>
This commit is contained in:
parent
9c42e85f91
commit
d89d9871bb
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue