Skip to content

Commit

Permalink
Fix code from comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesús Macias committed Dec 1, 2015
1 parent afd1d8e commit fc918bc
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
}

0 comments on commit fc918bc

Please sign in to comment.