-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improve][Core][Exceptiom Management] Add Exception Management API & Unified Exception in API Module #3045
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I have a different point of view, why don't we directly inherit SeaTunnelException to implement different types of Exception, but use enumeration to determine the Exception type? What is the use of Code for users? And it is impossible to manage all Exception through CommonErrorCode, and some Exceptions will use CommonErrorCode, and some will not be used. |
Every connector will implement their own codes. Unified exception make error message more clearly. If we directly inherit SeaTunnelException, for all modules need create more and more exceptions. This is a good practice reference from datax. |
+1. It's better to use a different implementation. |
So if a connector has more than 10 types exceptions, do we need define more than 10 classes to display those? It's not a good option. More More fine-grained exception I want to show what should I do? |
|
That's what I'm worried about. |
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java
Outdated
Show resolved
Hide resolved
3612043
to
8fd4dec
Compare
@ashulin @Hisoka-X @EricJoy2048 @CalvinKirs @hailin0 Please review and give some suggestions. Thx |
Hi, all. What is our conclusion? I agree with @TyrantLucifer , The exception handling of Especially when we need to collect error data in the future, ErrorCode can be stored in the error data together with the data. When we display the cause of the error in the web page, the ErrorCode can obtain the details of the exception, which is very helpful for the analysis of error data. |
ae89b3f
to
3948eff
Compare
seatunnel-common/src/main/java/org/apache/seatunnel/common/exception/CommonErrorCode.java
Outdated
Show resolved
Hide resolved
d9fb8bc
to
c6b358f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Purpose of this pull request
close #3043
Check list
New License Guide