blob: 465bc8b84814c91831af1326fbcaaefe8cf4f5fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//! ref: composer/src/Composer/Json/JsonValidationException.php
use shirabe_php_shim::Exception;
#[derive(Debug)]
pub struct JsonValidationException {
inner: Exception,
pub(crate) errors: Vec<String>,
}
impl JsonValidationException {
pub fn new(message: String, errors: Vec<String>) -> Self {
Self {
inner: Exception { message, code: 0 },
errors,
}
}
pub fn get_errors(&self) -> &Vec<String> {
&self.errors
}
}
|