diff options
Diffstat (limited to 'crates/shirabe-external-packages/src/symfony/console/exception/runtime_exception.rs')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/exception/runtime_exception.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/exception/runtime_exception.rs b/crates/shirabe-external-packages/src/symfony/console/exception/runtime_exception.rs index cfc64774..12e5b79c 100644 --- a/crates/shirabe-external-packages/src/symfony/console/exception/runtime_exception.rs +++ b/crates/shirabe-external-packages/src/symfony/console/exception/runtime_exception.rs @@ -5,12 +5,16 @@ use super::exception_interface::ExceptionInterface; #[derive(Debug)] pub struct RuntimeException(pub shirabe_php_shim::RuntimeException); -impl std::fmt::Display for RuntimeException { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.0) +impl RuntimeException { + pub fn new(message: String) -> Self { + Self(shirabe_php_shim::RuntimeException::new(message)) } } -impl std::error::Error for RuntimeException {} +shirabe_php_shim::impl_php_exception!( + RuntimeException, + 0, + r"Symfony\Component\Console\Exception\RuntimeException" +); impl ExceptionInterface for RuntimeException {} |
