Open micbar opened 5 years ago
NotFoundExceptions in the ShareExtractor are not visible in the CLI because the the exception has NULL as a message.
It only shows up in the CLI as an empty line.
Catch the NotFoundExceptions and provide a meaningful message which enables the admin to find the cause of the problem.
+ try { + $shareModel->setPath($userFolder->getRelativePath($share->getNode()->getPath())) + ->setShareType(Share::SHARETYPE_USER) + ->setOwner($share->getShareOwner()) + ->setSharedBy($share->getSharedBy()) + ->setSharedWith($share->getSharedWith()) + ->setPermissions($share->getPermissions()); + // the rest of the model attributes doesn't make sense with local shares + $this->streamHelper->writelnToStream( + $this->streamFile, + $shareModel + ); + } catch (NotFoundException $exception) { + $shareId = $share->getId(); + throw new ImportException("Could not find Node for shareId $shareId"); + }
Problem
NotFoundExceptions in the ShareExtractor are not visible in the CLI because the the exception has NULL as a message.
It only shows up in the CLI as an empty line.
Solution
Catch the NotFoundExceptions and provide a meaningful message which enables the admin to find the cause of the problem.