Add PHPDoc and handle exception in ScanAppData as well

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2017-04-19 17:04:16 -05:00
parent ce2dba0796
commit fbedea0807
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
2 changed files with 3 additions and 0 deletions

View File

@ -128,6 +128,8 @@ class ScanAppData extends Base {
} catch (InterruptedException $e) {
# exit the function if ctrl-c has been pressed
$output->writeln('Interrupted by user');
} catch (NotFoundException $e) {
$output->writeln('<error>Path not found: ' . $e->getMessage() . '</error>');
} catch (\Exception $e) {
$output->writeln('<error>Exception during scan: ' . $e->getMessage() . '</error>');
$output->writeln('<error>' . $e->getTraceAsString() . '</error>');

View File

@ -162,6 +162,7 @@ class Scanner extends PublicEmitter {
/**
* @param string $dir
* @throws \OC\ForbiddenException
* @throws \OCP\Files\NotFoundException
*/
public function scan($dir = '') {
if (!Filesystem::isValidPath($dir)) {