diff options
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.rs | 6 |
1 files changed, 6 insertions, 0 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 076d157..42422af 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 @@ -6,6 +6,12 @@ pub struct RuntimeException { pub code: i64, } +impl RuntimeException { + pub fn new(message: String) -> Self { + Self { message, code: 0 } + } +} + impl std::fmt::Display for RuntimeException { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{}", self.message) |
