aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-symfony-console/src/exception/invalid_option_exception.rs
blob: 04de3d4251a9c65ad13fec681acbcccef04ceefd (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/console/Exception/InvalidOptionException.php

use super::exception_interface::ExceptionInterface;
use shirabe_php_shim::InvalidArgumentException;

#[derive(Debug)]
pub struct InvalidOptionException(pub InvalidArgumentException);

impl InvalidOptionException {
    pub fn new(message: String) -> Self {
        Self(InvalidArgumentException::new(message))
    }
}

shirabe_php_shim::impl_php_exception!(
    InvalidOptionException,
    0,
    r"Symfony\Component\Console\Exception\InvalidOptionException"
);

impl ExceptionInterface for InvalidOptionException {}