diff options
Diffstat (limited to 'crates/shirabe/src/plugin/plugin_blocked_exception.rs')
| -rw-r--r-- | crates/shirabe/src/plugin/plugin_blocked_exception.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/crates/shirabe/src/plugin/plugin_blocked_exception.rs b/crates/shirabe/src/plugin/plugin_blocked_exception.rs index fcf52ace..b6a6070a 100644 --- a/crates/shirabe/src/plugin/plugin_blocked_exception.rs +++ b/crates/shirabe/src/plugin/plugin_blocked_exception.rs @@ -8,14 +8,12 @@ pub struct PluginBlockedException(pub UnexpectedValueException); impl PluginBlockedException { pub fn new(message: String) -> Self { - Self(UnexpectedValueException { message, code: 0 }) + Self(UnexpectedValueException::new(message)) } } -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 {} +shirabe_php_shim::impl_php_exception!( + PluginBlockedException, + 0, + r"Composer\Plugin\PluginBlockedException" +); |
