summaryrefslogtreecommitdiffstats
path: root/lib/private/template/resourcenotfoundexception.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/template/resourcenotfoundexception.php')
-rw-r--r--lib/private/template/resourcenotfoundexception.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/private/template/resourcenotfoundexception.php b/lib/private/template/resourcenotfoundexception.php
new file mode 100644
index 00000000000..8a728fce2f1
--- /dev/null
+++ b/lib/private/template/resourcenotfoundexception.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * ownCloud
+ *
+ * @author Joas Schilling
+ * @copyright 2015 Joas Schilling nickvergessen@owncloud.com
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Template;
+
+class ResourceNotFoundException extends \LogicException {
+ protected $resource;
+ protected $webPath;
+
+ /**
+ * @param string $resource
+ * @param string $webPath
+ */
+ public function __construct($resource, $webPath) {
+ parent::__construct('Resource not found');
+ $this->resource = $resource;
+ $this->webPath = $webPath;
+ }
+
+ /**
+ * @return string
+ */
+ public function getResourcePath() {
+ return $this->resource . '/' . $this->webPath;
+ }
+}