Browse Source

Fix code from comments

tags/v9.0beta1
Jesús Macias 8 years ago
parent
commit
9dd11091d4

lib/public/files/extstorageconnectionexception.php → lib/public/files/storageauthexception.php 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);
}
}

lib/public/files/extstoragebadconfigexception.php → lib/public/files/storagebadconfigexception.php 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);
}

}

lib/public/files/extstoragetimeoutexception.php → lib/public/files/storageconnectionexception.php 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);
}
}

lib/public/files/extstorageauthexception.php → lib/public/files/storagetimeoutexception.php 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);
}
}

Loading…
Cancel
Save