diff options
Diffstat (limited to 'application/exceptions/FileUploadVerifyException.php')
-rw-r--r-- | application/exceptions/FileUploadVerifyException.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/application/exceptions/FileUploadVerifyException.php b/application/exceptions/FileUploadVerifyException.php new file mode 100644 index 000000000..d091c1eab --- /dev/null +++ b/application/exceptions/FileUploadVerifyException.php @@ -0,0 +1,23 @@ +<?php +/* + * Licensed under AGPLv3 + * (see COPYING for full license text) + * + */ +namespace exceptions; + +class FileUploadVerifyException extends UserInputException { + public function __toString() + { + $ret = $this->getMessage()."\n"; + $data = $this->get_data(); + $errors = array(); + + foreach ($data as $error) { + $errors[] = sprintf("%s: %s", $error["filename"], $error["message"]); + } + + $ret .= implode("\n", $errors); + return $ret; + } +} |