Snow-kal commented on code in PR #3183:
URL: https://github.com/apache/dubbo-go/pull/3183#discussion_r2736527218
##########
protocol/dubbo/hessian2/hessian_response.go:
##########
@@ -41,6 +41,51 @@ type DubboResponse struct {
Attachments map[string]any
}
+// GenericException keeps Java exception class and message.
+type GenericException struct {
+ ExceptionClass string
+ ExceptionMessage string
+}
+
+// Error returns a readable error string.
+func (e GenericException) Error() string {
+ if e.ExceptionClass == "" {
+ return e.ExceptionMessage
+ }
+ if e.ExceptionMessage == "" {
+ return e.ExceptionClass
+ }
+ return "java exception: " + e.ExceptionClass + " - " +
e.ExceptionMessage
+}
Review Comment:
已修改
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]