Add custom exception class for failing downloads

This commit is contained in:
Joshua Ramon Enslin 2023-04-12 15:26:31 +02:00
parent a2b0325f5b
commit 3148affb04
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -0,0 +1,25 @@
<?PHP
/**
* Custom exception class to be raised when downloading a file fails.
*
* @file
*
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
*/
declare(strict_types = 1);
/**
* Custom exception class to be raised when downloading a file fails.
*/
final class MDDownloadException extends Exception {
/**
* Error message.
*
* @return string
*/
public function errorMessage() {
//error message
return 'Link could not be downloaded: ' . $this->getMessage();
}
}