aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/downloader/max_file_size_exceeded_exception.rs
blob: ebec74df0296461241bdad6ea9719047b4a7982c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//! ref: composer/src/Composer/Downloader/MaxFileSizeExceededException.php

use crate::downloader::TransportException;

#[derive(Debug)]
pub struct MaxFileSizeExceededException(pub TransportException);

impl MaxFileSizeExceededException {
    pub fn new(message: String) -> Self {
        Self(TransportException::new(message, 0))
    }
}

impl std::fmt::Display for MaxFileSizeExceededException {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        self.0.fmt(f)
    }
}

impl std::error::Error for MaxFileSizeExceededException {}