return false;
} catch (\Sabre\DAV\Exception $e) {
$this->convertSabreException($e);
+ return false;
} catch (\Exception $e) {
// TODO: log for now, but in the future need to wrap/rethrow exception
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
return false;
} catch (\Sabre\DAV\Exception $e) {
$this->convertSabreException($e);
+ return false;
} catch (\Exception $e) {
// TODO: log for now, but in the future need to wrap/rethrow exception
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
return false;
} catch (\Sabre\DAV\Exception $e) {
$this->convertSabreException($e);
+ return false;
} catch (\Exception $e) {
// TODO: log for now, but in the future need to wrap/rethrow exception
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
return false;
} catch (\Sabre\DAV\Exception $e) {
$this->convertSabreException($e);
+ return false;
} catch (\Exception $e) {
// TODO: log for now, but in the future need to wrap/rethrow exception
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
return true;
} catch (\Sabre\DAV\Exception $e) {
$this->convertSabreException($e);
+ return false;
} catch (\Exception $e) {
// TODO: log for now, but in the future need to wrap/rethrow exception
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
return true;
} catch (\Sabre\DAV\Exception $e) {
$this->convertSabreException($e);
+ return false;
} catch (\Exception $e) {
// TODO: log for now, but in the future need to wrap/rethrow exception
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
return array();
} catch (\Sabre\DAV\Exception $e) {
$this->convertSabreException($e);
+ return false;
} catch (\Exception $e) {
// TODO: log for now, but in the future need to wrap/rethrow exception
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
} else {
return false;
}
+ } catch (Exception\NotFound $e) {
+ return false;
} catch (\Sabre\DAV\Exception $e) {
$this->convertSabreException($e);
+ return false;
} catch (\Exception $e) {
// TODO: log for now, but in the future need to wrap/rethrow exception
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
try {
$response = $this->client->request($method, $this->encodePath($path), $body);
return $response['statusCode'] == $expected;
+ } catch (Exception\NotFound $e) {
+ if ($method === 'DELETE') {
+ return false;
+ }
+
+ $this->convertSabreException($e);
+ return false;
} catch (\Sabre\DAV\Exception $e) {
$this->convertSabreException($e);
+ return false;
} catch (\Exception $e) {
// TODO: log for now, but in the future need to wrap/rethrow exception
\OCP\Util::writeLog('files_external', $e->getMessage(), \OCP\Util::ERROR);
return false;
} catch (Exception $e) {
$this->convertSabreException($e);
+ return false;
}
}
if ($e instanceof \Sabre\DAV\Exception\NotAuthenticated) {
// either password was changed or was invalid all along
throw new StorageInvalidException(get_class($e).': '.$e->getMessage());
+ } else if ($e instanceof \Sabre\DAV\Exception\MethodNotAllowed) {
+ // ignore exception, false will be returned
+ return;
}
throw new StorageNotAvailableException(get_class($e).': '.$e->getMessage());