added exception messages

This commit is contained in:
Christian Berendt 2013-07-08 15:10:10 +02:00
parent 8c9e6db1b1
commit 882d5ad728
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
public function __construct($params) {
if ( ! isset($params['key']) || ! isset($params['secret']) || ! isset($params['bucket'])) {
throw new \Exception();
throw new \Exception("Access Key, Secret and Bucket have to be configured.");
}
$this->id = 'amazon::' . $params['key'] . md5($params['secret']);
@ -76,7 +76,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
}
if (! $this->connection->isValidBucketName($this->bucket)) {
throw new \Exception();
throw new \Exception("The configured bucket name is invalid.");
}
if ( ! $this->connection->doesBucketExist($this->bucket)) {