summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@owncloud.com>2016-04-26 09:29:15 +0200
committerChristoph Wurst <christoph@owncloud.com>2016-04-26 14:51:21 +0200
commite93bf80b29cde236c5d78023b49435283e4b2562 (patch)
tree3640e7778974a0577f0eaf6661280bb76edceaa1 /lib/public
parent0d53e86421faef0300d509b385934754b4dab88c (diff)
downloadnextcloud-server-e93bf80b29cde236c5d78023b49435283e4b2562.tar.gz
nextcloud-server-e93bf80b29cde236c5d78023b49435283e4b2562.zip
throw SessionNotAvailableException if session_id returns empty string
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Session/Exceptions/SessionNotAvailableException.php32
-rw-r--r--lib/public/isession.php1
2 files changed, 33 insertions, 0 deletions
diff --git a/lib/public/Session/Exceptions/SessionNotAvailableException.php b/lib/public/Session/Exceptions/SessionNotAvailableException.php
new file mode 100644
index 00000000000..d347e0df15e
--- /dev/null
+++ b/lib/public/Session/Exceptions/SessionNotAvailableException.php
@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * @author Christoph Wurst <christoph@owncloud.com>
+ *
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCP\Session\Exceptions;
+
+use Exception;
+
+/**
+ * @since 9.1.0
+ */
+class SessionNotAvailableException extends Exception {
+
+}
diff --git a/lib/public/isession.php b/lib/public/isession.php
index 16c6f9bc6a5..7bc8654a1b9 100644
--- a/lib/public/isession.php
+++ b/lib/public/isession.php
@@ -100,6 +100,7 @@ interface ISession {
* Wrapper around session_id
*
* @return string
+ * @throws SessionNotAvailableException
* @since 9.1.0
*/
public function getId();