aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/event_dispatcher/script_execution_exception.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/event_dispatcher/script_execution_exception.rs')
-rw-r--r--crates/shirabe/src/event_dispatcher/script_execution_exception.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/shirabe/src/event_dispatcher/script_execution_exception.rs b/crates/shirabe/src/event_dispatcher/script_execution_exception.rs
index 23b763f..05567b0 100644
--- a/crates/shirabe/src/event_dispatcher/script_execution_exception.rs
+++ b/crates/shirabe/src/event_dispatcher/script_execution_exception.rs
@@ -6,6 +6,16 @@ use shirabe_php_shim::RuntimeException;
#[derive(Debug)]
pub struct ScriptExecutionException(pub RuntimeException);
+impl ScriptExecutionException {
+ pub fn get_code(&self) -> i64 {
+ self.0.code
+ }
+
+ pub fn get_message(&self) -> &str {
+ &self.0.message
+ }
+}
+
impl std::fmt::Display for ScriptExecutionException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.0.fmt(f)