summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticMediaWiki/src/Elastic/Exception/InvalidJSONException.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/SemanticMediaWiki/src/Elastic/Exception/InvalidJSONException.php')
-rw-r--r--www/wiki/extensions/SemanticMediaWiki/src/Elastic/Exception/InvalidJSONException.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/www/wiki/extensions/SemanticMediaWiki/src/Elastic/Exception/InvalidJSONException.php b/www/wiki/extensions/SemanticMediaWiki/src/Elastic/Exception/InvalidJSONException.php
new file mode 100644
index 00000000..3b2db2f5
--- /dev/null
+++ b/www/wiki/extensions/SemanticMediaWiki/src/Elastic/Exception/InvalidJSONException.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace SMW\Elastic\Exception;
+
+use RuntimeException;
+use SMW\Utils\ErrorCodeFormatter;
+
+/**
+ * @license GNU GPL v2+
+ * @since 3.0
+ *
+ * @author mwjames
+ */
+class InvalidJSONException extends RuntimeException {
+
+ /**
+ * @since 3.0
+ */
+ public function __construct( $error, $content = '' ) {
+ parent::__construct( ErrorCodeFormatter::getMessageFromJsonErrorCode( $error ) . " caused by: $content" );
+ }
+
+}