\OC_Mount_Config::STATUS_INDETERMINATE,
$this->l10n->t('Insufficient data: %s', [$e->getMessage()])
);
- } catch (ExtStorageBadConfigException $e) {
- $storage->setStatus(
- $e->getCode(),
- $this->l10n->t('%s', [$e->getMessage()])
- );
- } catch (ExtStorageAuthException $e) {
- $storage->setStatus(
- $e->getCode(),
- $this->l10n->t('%s', [$e->getMessage()])
- );
- } catch (ExtStorageTimeoutException $e) {
- $storage->setStatus(
- $e->getCode(),
- $this->l10n->t('%s', [$e->getMessage()])
- );
- } catch (ExtStorageConnectionException $e) {
- $storage->setStatus(
- $e->getCode(),
- $this->l10n->t('%s', [$e->getMessage()])
- );
} catch (StorageNotAvailableException $e) {
$storage->setStatus(
- \OC_Mount_Config::STATUS_ERROR,
+ $e->getCode(),
$this->l10n->t('%s', [$e->getMessage()])
);
} catch (\Exception $e) {
* @param \Exception $previous
* @since 9.0.0
*/
- public function __construct($message = '', $code, \Exception $previous = null) {
+ public function __construct($message = '', \Exception $previous = null) {
$l = \OC::$server->getL10N('core');
- parent::__construct($message, $l->t('External storage unauthorized'), 3, $previous);
+ parent::__construct($l->t('External storage unauthorized. %s', $message), self::STATUS_UNAUTHORIZED, $previous);
}
}
* @param \Exception $previous
* @since 9.0.0
*/
- public function __construct($message = '', $code, \Exception $previous = null) {
+ public function __construct($message = '', \Exception $previous = null) {
$l = \OC::$server->getL10N('core');
- parent::__construct($message, $l->t('External storage incomplete configuration'), 2, $previous);
+ parent::__construct($l->t('External storage incomplete configuration. %s', $message), self::STATUS_INCOMPLETE_CONF, $previous);
}
}
* @param \Exception $previous
* @since 9.0.0
*/
- public function __construct($message = '', $code, \Exception $previous = null) {
+ public function __construct($message = '', \Exception $previous = null) {
$l = \OC::$server->getL10N('core');
- parent::__construct($message, $l->t('External storage connection error'), 5, $previous);
+ parent::__construct($l->t('External storage connection error. %s', $message), self::STATUS_NETWORK_ERROR, $previous);
}
}
* @param \Exception $previous
* @since 9.0.0
*/
- public function __construct($message = '', $code, \Exception $previous = null) {
+ public function __construct($message = '', \Exception $previous = null) {
$l = \OC::$server->getL10N('core');
- parent::__construct($message, $l->t('External storage connection timeout'), 4, $previous);
+ parent::__construct($l->t('External storage connection timeout. %s', $message), self::STATUS_TIMEOUT, $previous);
}
}
*/
class StorageNotAvailableException extends HintException {
+ const STATUS_INCOMPLETE_CONF = 3;
+ const STATUS_UNAUTHORIZED = 4;
+ const STATUS_TIMEOUT = 5;
+ const STATUS_NETWORK_ERROR = 6;
+
/**
* StorageNotAvailableException constructor.
*