Add PHPDoc and handle exception in ScanAppData as well
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
ce2dba0796
commit
fbedea0807
|
@ -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>');
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue