[
https://issues.apache.org/jira/browse/DRILL-3132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14549549#comment-14549549
]
Daniel Barclay (Drill) commented on DRILL-3132:
-----------------------------------------------
Are you overriding UserException.printStackTrace() or
UserRemoteException.printStackTrace()? Overriding the latter seems more likely
to make sense than overriding the former.
Even so, overriding printStackTrace() so that it prints some _other_
exception's stack trace still seems likely to be confusing.
Can you accomplish adding the server-side stack trace you want without hiding
the true stack trace of the client-side exception object by chaining the
top-level UserRemoteException to another exception that has a copy of the
server-side stack trace?
Then printStackTrace() on the top-level exception on the client side will still
show where the exception was received (e.g.,
QueryResultHandler.resultArrived(...)), and after the "caused by" will show the
server-side stack trace you want shown too.
(Regarding changing UserException's printStackTrace: Note that UserException
is used on the client side (JDBC driver) too (for reporting connection
failures).)
> Improve User Exceptions
> -----------------------
>
> Key: DRILL-3132
> URL: https://issues.apache.org/jira/browse/DRILL-3132
> Project: Apache Drill
> Issue Type: Improvement
> Reporter: Deneche A. Hakim
> Assignee: Deneche A. Hakim
> Priority: Minor
> Fix For: 1.2.0
>
>
> - add getErrorType(). UserRemoteException should return the error type of the
> underlying pberror object
> - override UserException.printStackTrace() to print the stack trace of the
> original exception, or in the case of UserRemoteException the stack trace
> that was passed with the pberror object.
> - user exception context can store "debug" informations that will only be
> visible for system errors or in verbose mode
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)