aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/symfony/process/exception/invalid_argument_exception.rs
blob: b70a1d3932f58321b989d59313dde9a99df9129c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//! ref: composer/vendor/symfony/process/Exception/InvalidArgumentException.php

#[derive(Debug)]
pub struct InvalidArgumentException {
    pub message: String,
    pub code: i64,
}

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

impl std::fmt::Display for InvalidArgumentException {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", self.message)
    }
}

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