aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/plugin/plugin_blocked_exception.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/plugin/plugin_blocked_exception.rs')
-rw-r--r--crates/shirabe/src/plugin/plugin_blocked_exception.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/shirabe/src/plugin/plugin_blocked_exception.rs b/crates/shirabe/src/plugin/plugin_blocked_exception.rs
index cf3c7ce..fcf52ac 100644
--- a/crates/shirabe/src/plugin/plugin_blocked_exception.rs
+++ b/crates/shirabe/src/plugin/plugin_blocked_exception.rs
@@ -6,6 +6,12 @@ use shirabe_php_shim::UnexpectedValueException;
#[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)