summaryrefslogtreecommitdiffstats
path: root/application/exceptions/VerifyException.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-02-03 12:11:28 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-02-03 12:16:38 +0100
commit5816cbcad0e9c4cda4dc10b730a5a1ea2c4e419a (patch)
tree6724a88a7bcc3b97d6277550125bac91b4a72597 /application/exceptions/VerifyException.php
parenta788fe55713e7c44068ee2dd8377b98037d9375f (diff)
api: implement file/create_multipaste
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/exceptions/VerifyException.php')
-rw-r--r--application/exceptions/VerifyException.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/application/exceptions/VerifyException.php b/application/exceptions/VerifyException.php
new file mode 100644
index 000000000..0e9d8b93a
--- /dev/null
+++ b/application/exceptions/VerifyException.php
@@ -0,0 +1,23 @@
+<?php
+/*
+ * Licensed under AGPLv3
+ * (see COPYING for full license text)
+ *
+ */
+namespace exceptions;
+
+class VerifyException extends UserInputException {
+ public function __toString()
+ {
+ $ret = $this->getMessage()."\n";
+ $data = $this->get_data();
+ $errors = array();
+
+ foreach ($data as $error) {
+ $errors[] = sprintf("%s: %s", $error["id"], $error["reason"]);
+ }
+
+ $ret .= implode("\n", $errors);
+ return $ret;
+ }
+}