From 730c80ff9c83ff1b027ab804ecad599fbcaf7bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Mon, 7 Oct 2013 15:11:47 +0200 Subject: [PATCH] adding additional exceptions for special cases where creating a file might not be allowed --- .../sabre/exception/entitytoolarge.php | 23 +++++++++++++++++++ .../sabre/exception/unsupportedmediatype.php | 22 ++++++++++++++++++ lib/private/connector/sabre/file.php | 7 ++++++ lib/public/files/entitytoolargeexception.php | 11 +++++++++ lib/public/files/invalidcontentexception.php | 11 +++++++++ lib/public/files/invalidpathexception.php | 11 +++++++++ 6 files changed, 85 insertions(+) create mode 100644 lib/private/connector/sabre/exception/entitytoolarge.php create mode 100644 lib/private/connector/sabre/exception/unsupportedmediatype.php create mode 100644 lib/public/files/entitytoolargeexception.php create mode 100644 lib/public/files/invalidcontentexception.php create mode 100644 lib/public/files/invalidpathexception.php diff --git a/lib/private/connector/sabre/exception/entitytoolarge.php b/lib/private/connector/sabre/exception/entitytoolarge.php new file mode 100644 index 0000000000..aa9b37a049 --- /dev/null +++ b/lib/private/connector/sabre/exception/entitytoolarge.php @@ -0,0 +1,23 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCP\Files; + +class EntityTooLargeException extends \Exception {} diff --git a/lib/public/files/invalidcontentexception.php b/lib/public/files/invalidcontentexception.php new file mode 100644 index 0000000000..184ec4d06d --- /dev/null +++ b/lib/public/files/invalidcontentexception.php @@ -0,0 +1,11 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCP\Files; + +class InvalidContentException extends \Exception {} diff --git a/lib/public/files/invalidpathexception.php b/lib/public/files/invalidpathexception.php new file mode 100644 index 0000000000..36090ae5b4 --- /dev/null +++ b/lib/public/files/invalidpathexception.php @@ -0,0 +1,11 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCP\Files; + +class InvalidPathException extends \Exception {}