Add: GenericException struct and ToGenericException converter - #397
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a Go-side GenericException representation to dubbo-go-hessian2 and a ToGenericException helper to normalize several decoded exception shapes (including java_exception.DubboGenericException, java_exception.Throwabler, and legacy string errors) into a consistent {ExceptionClass, ExceptionMessage} form.
Changes:
- Introduce
GenericException(implementserror) to preserve Java exception class + message. - Add
ToGenericExceptionconverter for multiple decoded exception variants. - Add legacy-string parsing helper for older exception string formats.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
在 |
|
已修复CI错误:新增test里的import block没有拆开,未通过imports-formatter。现已修复 |
…dd typed-nil tests
|
增加了 |
|
@Modo-me 问一下:
|
|
查看了一下 apache/dubbo-go#3183 , GenericException 不参与序列化。 |
|
这个新增的exception来自于apache/dubbo-go#3183 而并非此次pr新增,在dubbo-go源码的protocol/dubbo/hessian2/hessian_response.go下。而这个pr旨在把这个exception的定义从dubbo-go迁移到dubbo-go-hessian2(根据apache/dubbo-go#3361 ), 同时补全了对应的单测 |
What this PR does:
在 dubbo-go-hessian2 中新增 GenericException 定义
Which issue(s) this PR fixes:
Fixes apache/dubbo-go#3361 #388
Special notes for your reviewer:
实现了apache/dubbo-go#3361 里的阶段1,在dubbo-go-hessian2 中新增 GenericException结构体以及相关方法,根据原dubbo-go 侧的 GenericException定义,保持新增内容与此前apache/dubbo-go#3183 里引入的GenericException新增内容一致。
此改动对Java端兼容没有产生影响。
Does this PR introduce a user-facing change?: