aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/symfony/process/exception/runtime_exception.rs
blob: 42422aff69152ae1de79d35b0c8cea2453a3c775 (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/RuntimeException.php

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

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

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

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