Fix code from comments

This commit is contained in:
Jesús Macias 2015-12-01 17:27:06 +01:00 committed by Morris Jobke
parent f4f53e328d
commit 9dd11091d4
4 changed files with 15 additions and 27 deletions

View File

@ -18,19 +18,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
// use OCP namespace for all classes that are considered public.
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP\Files;
/**
* External Storage authentication exception
* Storage authentication exception
* @since 9.0.0
*/
class ExtStorageConnectionException extends StorageNotAvailableException {
class StorageAuthException extends StorageNotAvailableException {
/**
* ExtStorageConnectionException constructor.
* StorageAuthException constructor.
*
* @param string $message
* @param int $code
@ -39,6 +36,6 @@ class ExtStorageConnectionException extends StorageNotAvailableException {
*/
public function __construct($message = '', \Exception $previous = null) {
$l = \OC::$server->getL10N('core');
parent::__construct($l->t('External storage connection error. %s', $message), self::STATUS_NETWORK_ERROR, $previous);
parent::__construct($l->t('Storage unauthorized. %s', $message), self::STATUS_UNAUTHORIZED, $previous);
}
}

View File

@ -18,16 +18,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
// use OCP namespace for all classes that are considered public.
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP\Files;
/**
* External Storage has bad or missing config params
* Storage has bad or missing config params
* @since 9.0.0
*/
class ExtStorageBadConfigException extends StorageNotAvailableException {
class StorageBadConfigException extends StorageNotAvailableException {
/**
* ExtStorageBadConfigException constructor.
@ -39,7 +36,7 @@ class ExtStorageBadConfigException extends StorageNotAvailableException {
*/
public function __construct($message = '', \Exception $previous = null) {
$l = \OC::$server->getL10N('core');
parent::__construct($l->t('External storage incomplete configuration. %s', $message), self::STATUS_INCOMPLETE_CONF, $previous);
parent::__construct($l->t('Storage incomplete configuration. %s', $message), self::STATUS_INCOMPLETE_CONF, $previous);
}
}

View File

@ -18,19 +18,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
// use OCP namespace for all classes that are considered public.
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP\Files;
/**
* External Storage authentication exception
* Storage authentication exception
* @since 9.0.0
*/
class ExtStorageTimeoutException extends StorageNotAvailableException {
class StorageConnectionException extends StorageNotAvailableException {
/**
* ExtStorageTimeoutException constructor.
* StorageConnectionException constructor.
*
* @param string $message
* @param int $code
@ -39,6 +36,6 @@ class ExtStorageTimeoutException extends StorageNotAvailableException {
*/
public function __construct($message = '', \Exception $previous = null) {
$l = \OC::$server->getL10N('core');
parent::__construct($l->t('External storage connection timeout. %s', $message), self::STATUS_TIMEOUT, $previous);
parent::__construct($l->t('Storage connection error. %s', $message), self::STATUS_NETWORK_ERROR, $previous);
}
}

View File

@ -18,19 +18,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
// use OCP namespace for all classes that are considered public.
// This means that they should be used by apps instead of the internal ownCloud classes
namespace OCP\Files;
/**
* External Storage authentication exception
* Storage authentication exception
* @since 9.0.0
*/
class ExtStorageAuthException extends StorageNotAvailableException {
class StorageTimeoutException extends StorageNotAvailableException {
/**
* ExtStorageAuthException constructor.
* StorageTimeoutException constructor.
*
* @param string $message
* @param int $code
@ -39,6 +36,6 @@ class ExtStorageAuthException extends StorageNotAvailableException {
*/
public function __construct($message = '', \Exception $previous = null) {
$l = \OC::$server->getL10N('core');
parent::__construct($l->t('External storage unauthorized. %s', $message), self::STATUS_UNAUTHORIZED, $previous);
parent::__construct($l->t('Storage connection timeout. %s', $message), self::STATUS_TIMEOUT, $previous);
}
}