//! ref: composer/src/Composer/Json/JsonValidationException.php use shirabe_php_shim::Exception; #[derive(Debug)] pub struct JsonValidationException { inner: Exception, pub(crate) errors: Vec, } impl JsonValidationException { pub fn new(message: String, errors: Vec) -> Self { Self { inner: Exception { message, code: 0 }, errors, } } pub fn get_errors(&self) -> &Vec { &self.errors } }