huhmare commented on PR #2137:
URL: https://github.com/apache/cxf/pull/2137#issuecomment-2470815340

   I am little bit late for commenting the PR, but it seems to me that this 
aproach might prevent usage of custom subbed Exception, that contain custom 
member variables. The cloning is done with certain constructor, so the custom 
subclass will not be initialized correctly. I apologize, that I can not try 
this out just now.
                                                
   Is this something that you might consider a problem? Then again, maybe the 
messageDetail is more important, if we have to choose.
   
   Here is the subclass with a member to make the explanation clear:            
        
   ```
                class ExampleException extends Exception {
                        public int errorCode;
                        
                        public ExampleException(String msg, Throwable cause, 
int errorCode) {
                                this(msg cause)
                                this.errorCode = errorCode;
                        }
                        public ExampleException(String message, Throwable ex) {
                                super(msg, cause)
                        }
                }
   ```
   


-- 
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: dev-unsubscr...@cxf.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to