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