aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe-external-packages/src/symfony/process/exception/logic_exception.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/process/exception/logic_exception.rs')
-rw-r--r--crates/shirabe-external-packages/src/symfony/process/exception/logic_exception.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/process/exception/logic_exception.rs b/crates/shirabe-external-packages/src/symfony/process/exception/logic_exception.rs
index c9a34661..36e9bcca 100644
--- a/crates/shirabe-external-packages/src/symfony/process/exception/logic_exception.rs
+++ b/crates/shirabe-external-packages/src/symfony/process/exception/logic_exception.rs
@@ -2,20 +2,19 @@
#[derive(Debug)]
pub struct LogicException {
- pub message: String,
- pub code: i64,
+ inner: shirabe_php_shim::LogicException,
}
impl LogicException {
pub fn new(message: String) -> Self {
- Self { message, code: 0 }
+ Self {
+ inner: shirabe_php_shim::LogicException::new(message),
+ }
}
}
-impl std::fmt::Display for LogicException {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(f, "{}", self.message)
- }
-}
-
-impl std::error::Error for LogicException {}
+shirabe_php_shim::impl_php_exception!(
+ LogicException,
+ inner,
+ r"Symfony\Component\Process\Exception\LogicException"
+);