Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-11-04 05:31:50 +0300
committerThomas Steur <thomas.steur@googlemail.com>2014-11-04 05:31:50 +0300
commitffa5c1e86e578ff166d5c55a5edb1ca14f1e3d28 (patch)
tree775467ba3e6c16d625f63e574738f5d3a99bc72f /core/Exception
parentbde45453cda42c88b19d660ca406c61cb1130ce0 (diff)
refs #6564 refactored out HtmlMessageException and introduced some other exceptions instead
Diffstat (limited to 'core/Exception')
-rw-r--r--core/Exception/AuthenticationFailedException.php13
-rw-r--r--core/Exception/Exception.php30
-rw-r--r--core/Exception/MissingFilePermissionException.php13
-rw-r--r--core/Exception/NoPrivilegesException.php13
-rw-r--r--core/Exception/NoWebsiteFoundException.php13
5 files changed, 82 insertions, 0 deletions
diff --git a/core/Exception/AuthenticationFailedException.php b/core/Exception/AuthenticationFailedException.php
new file mode 100644
index 0000000000..ca3efc25c1
--- /dev/null
+++ b/core/Exception/AuthenticationFailedException.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+namespace Piwik\Exception;
+
+class AuthenticationFailedException extends Exception
+{
+} \ No newline at end of file
diff --git a/core/Exception/Exception.php b/core/Exception/Exception.php
new file mode 100644
index 0000000000..106034bf5a
--- /dev/null
+++ b/core/Exception/Exception.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+namespace Piwik\Exception;
+
+use Exception as PhpException;
+
+/**
+ * An exception whose message has HTML content. When these exceptions are caught
+ * the message will not be sanitized before being displayed to the user.
+ */
+abstract class Exception extends PhpException
+{
+ private $isHtmlMessage = false;
+
+ public function setIsHtmlMessage()
+ {
+ $this->isHtmlMessage = true;
+ }
+
+ public function isHtmlMessage()
+ {
+ return $this->isHtmlMessage;
+ }
+} \ No newline at end of file
diff --git a/core/Exception/MissingFilePermissionException.php b/core/Exception/MissingFilePermissionException.php
new file mode 100644
index 0000000000..268725c70b
--- /dev/null
+++ b/core/Exception/MissingFilePermissionException.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+namespace Piwik\Exception;
+
+class MissingFilePermissionException extends Exception
+{
+} \ No newline at end of file
diff --git a/core/Exception/NoPrivilegesException.php b/core/Exception/NoPrivilegesException.php
new file mode 100644
index 0000000000..3ee8c9ce2b
--- /dev/null
+++ b/core/Exception/NoPrivilegesException.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+namespace Piwik\Exception;
+
+class NoPrivilegesException extends Exception
+{
+} \ No newline at end of file
diff --git a/core/Exception/NoWebsiteFoundException.php b/core/Exception/NoWebsiteFoundException.php
new file mode 100644
index 0000000000..eb97cad37a
--- /dev/null
+++ b/core/Exception/NoWebsiteFoundException.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+namespace Piwik\Exception;
+
+class NoWebsiteFoundException extends Exception
+{
+} \ No newline at end of file