diff options
Diffstat (limited to 'crates/shirabe-php-shim/src/lib.rs')
| -rw-r--r-- | crates/shirabe-php-shim/src/lib.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/shirabe-php-shim/src/lib.rs b/crates/shirabe-php-shim/src/lib.rs index d1db732..a8793cf 100644 --- a/crates/shirabe-php-shim/src/lib.rs +++ b/crates/shirabe-php-shim/src/lib.rs @@ -65,6 +65,14 @@ pub struct Exception { pub code: i64, } +impl std::fmt::Display for Exception { + fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + todo!() + } +} + +impl std::error::Error for Exception {} + #[derive(Debug)] pub struct RuntimeException { pub message: String, @@ -77,6 +85,8 @@ impl std::fmt::Display for RuntimeException { } } +impl std::error::Error for RuntimeException {} + #[derive(Debug)] pub struct UnexpectedValueException { pub message: String, @@ -89,6 +99,8 @@ impl std::fmt::Display for UnexpectedValueException { } } +impl std::error::Error for UnexpectedValueException {} + #[derive(Debug)] pub struct InvalidArgumentException { pub message: String, @@ -101,6 +113,8 @@ impl std::fmt::Display for InvalidArgumentException { } } +impl std::error::Error for InvalidArgumentException {} + #[derive(Debug)] pub struct LogicException { pub message: String, @@ -113,6 +127,8 @@ impl std::fmt::Display for LogicException { } } +impl std::error::Error for LogicException {} + #[derive(Debug)] pub struct BadMethodCallException { pub message: String, @@ -125,6 +141,8 @@ impl std::fmt::Display for BadMethodCallException { } } +impl std::error::Error for BadMethodCallException {} + #[derive(Debug)] pub struct OutOfBoundsException { pub message: String, @@ -137,6 +155,8 @@ impl std::fmt::Display for OutOfBoundsException { } } +impl std::error::Error for OutOfBoundsException {} + #[derive(Debug)] pub struct ErrorException { pub message: String, @@ -152,6 +172,8 @@ impl std::fmt::Display for ErrorException { } } +impl std::error::Error for ErrorException {} + pub fn is_bool(_value: &PhpMixed) -> bool { todo!() } |
