Change exception catch order
This commit is contained in:
parent
332c6748f9
commit
9d1ec02c5a
|
@ -241,11 +241,6 @@ abstract class StoragesController extends Controller {
|
||||||
\OC_Mount_Config::STATUS_INDETERMINATE,
|
\OC_Mount_Config::STATUS_INDETERMINATE,
|
||||||
$this->l10n->t('Insufficient data: %s', [$e->getMessage()])
|
$this->l10n->t('Insufficient data: %s', [$e->getMessage()])
|
||||||
);
|
);
|
||||||
} catch (StorageNotAvailableException $e) {
|
|
||||||
$storage->setStatus(
|
|
||||||
\OC_Mount_Config::STATUS_ERROR,
|
|
||||||
$this->l10n->t('%s', [$e->getMessage()])
|
|
||||||
);
|
|
||||||
} catch (ExtStorageBadConfigException $e) {
|
} catch (ExtStorageBadConfigException $e) {
|
||||||
$storage->setStatus(
|
$storage->setStatus(
|
||||||
$e->getCode(),
|
$e->getCode(),
|
||||||
|
@ -266,6 +261,11 @@ abstract class StoragesController extends Controller {
|
||||||
$e->getCode(),
|
$e->getCode(),
|
||||||
$this->l10n->t('%s', [$e->getMessage()])
|
$this->l10n->t('%s', [$e->getMessage()])
|
||||||
);
|
);
|
||||||
|
} catch (StorageNotAvailableException $e) {
|
||||||
|
$storage->setStatus(
|
||||||
|
\OC_Mount_Config::STATUS_ERROR,
|
||||||
|
$this->l10n->t('%s', [$e->getMessage()])
|
||||||
|
);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
// FIXME: convert storage exceptions to StorageNotAvailableException
|
// FIXME: convert storage exceptions to StorageNotAvailableException
|
||||||
$storage->setStatus(
|
$storage->setStatus(
|
||||||
|
|
Loading…
Reference in New Issue