This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 3791e727f chore(core): pub message of Error struct (#6986)
3791e727f is described below

commit 3791e727f186b992cc1a78b1c3a64091f9e4df6f
Author: sundyli <[email protected]>
AuthorDate: Sun Dec 14 18:38:06 2025 +0800

    chore(core): pub message of Error struct (#6986)
---
 core/core/src/types/error.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/core/core/src/types/error.rs b/core/core/src/types/error.rs
index 286998496..87c90921c 100644
--- a/core/core/src/types/error.rs
+++ b/core/core/src/types/error.rs
@@ -450,6 +450,11 @@ impl Error {
         self.status == ErrorStatus::Persistent
     }
 
+    /// Return error's message.
+    pub fn message(&self) -> &str {
+        self.message.as_str()
+    }
+
     /// Return error's backtrace.
     ///
     /// Note: the standard way of exposing backtrace is the unstable feature 
[`error_generic_member_access`](https://github.com/rust-lang/rust/issues/99301).

Reply via email to