diff options
-rw-r--r-- | lib/private/Avatar.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Node/Folder.php | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Avatar.php b/lib/private/Avatar.php index c3a068701df..fc1909c3bda 100644 --- a/lib/private/Avatar.php +++ b/lib/private/Avatar.php @@ -131,7 +131,7 @@ class Avatar implements IAvatar { } if (!($img->height() === $img->width())) { - throw new NotSquareException(); + throw new NotSquareException($this->l->t("Avatar image is not square")); } $this->remove(); diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index 353b89068cb..288a02ef207 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -42,7 +42,7 @@ class Folder extends Node implements \OCP\Files\Folder { */ public function getFullPath($path) { if (!$this->isValidPath($path)) { - throw new NotPermittedException(); + throw new NotPermittedException('Invalid path'); } return $this->path . $this->normalizePath($path); } @@ -152,7 +152,7 @@ class Folder extends Node implements \OCP\Files\Folder { $this->root->emit('\OC\Files', 'postCreate', array($node)); return $node; } else { - throw new NotPermittedException(); + throw new NotPermittedException('No create permission for folder'); } } @@ -173,7 +173,7 @@ class Folder extends Node implements \OCP\Files\Folder { $this->root->emit('\OC\Files', 'postCreate', array($node)); return $node; } else { - throw new NotPermittedException(); + throw new NotPermittedException('No create permission for path'); } } @@ -321,7 +321,7 @@ class Folder extends Node implements \OCP\Files\Folder { $this->root->emit('\OC\Files', 'postDelete', array($nonExisting)); $this->exists = false; } else { - throw new NotPermittedException(); + throw new NotPermittedException('No delete permission for path'); } } @@ -343,7 +343,7 @@ class Folder extends Node implements \OCP\Files\Folder { $this->root->emit('\OC\Files', 'postWrite', array($targetNode)); return $targetNode; } else { - throw new NotPermittedException(); + throw new NotPermittedException('No permission to copy to path'); } } @@ -366,7 +366,7 @@ class Folder extends Node implements \OCP\Files\Folder { $this->path = $targetPath; return $targetNode; } else { - throw new NotPermittedException(); + throw new NotPermittedException('No permission to move to path'); } } |