blob: fcf52aceec0054add5d609b08939a1f5cf76d586 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//! ref: composer/src/Composer/Plugin/PluginBlockedException.php
use shirabe_php_shim::UnexpectedValueException;
// TODO(plugin): PluginBlockedException is a part of Plugin API.
#[derive(Debug)]
pub struct PluginBlockedException(pub UnexpectedValueException);
impl PluginBlockedException {
pub fn new(message: String) -> Self {
Self(UnexpectedValueException { message, code: 0 })
}
}
impl std::fmt::Display for PluginBlockedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.0.fmt(f)
}
}
impl std::error::Error for PluginBlockedException {}
|