diff options
Diffstat (limited to 'crates/shirabe/src/exception/irrecoverable_download_exception.rs')
| -rw-r--r-- | crates/shirabe/src/exception/irrecoverable_download_exception.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crates/shirabe/src/exception/irrecoverable_download_exception.rs b/crates/shirabe/src/exception/irrecoverable_download_exception.rs index a8d2dbb4..ed424eff 100644 --- a/crates/shirabe/src/exception/irrecoverable_download_exception.rs +++ b/crates/shirabe/src/exception/irrecoverable_download_exception.rs @@ -5,10 +5,14 @@ use shirabe_php_shim::RuntimeException; #[derive(Debug)] pub struct IrrecoverableDownloadException(pub RuntimeException); -impl std::fmt::Display for IrrecoverableDownloadException { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - self.0.fmt(f) +impl IrrecoverableDownloadException { + pub fn new(message: String) -> Self { + Self(RuntimeException::new(message)) } } -impl std::error::Error for IrrecoverableDownloadException {} +shirabe_php_shim::impl_php_exception!( + IrrecoverableDownloadException, + 0, + r"Composer\Exception\IrrecoverableDownloadException" +); |
