Add new exception MDUploadTooLargeException
This commit is contained in:
parent
39ce16f72d
commit
eedc05d365
25
exceptions/updates/MDUploadTooLargeException.php
Normal file
25
exceptions/updates/MDUploadTooLargeException.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?PHP
|
||||
/**
|
||||
* This file contains an exception class for wrongly used files.
|
||||
*
|
||||
* @file
|
||||
*
|
||||
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
|
||||
/**
|
||||
* Custom exception class for wrongly used files.
|
||||
*/
|
||||
final class MDUploadTooLargeException extends Exception {
|
||||
/**
|
||||
* Error message.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function errorMessage() {
|
||||
//error message
|
||||
return 'This file\'s extension or mimetype is incorrect: ' . $this->getMessage();
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user