HyukjinKwon commented on a change in pull request #28661: URL: https://github.com/apache/spark/pull/28661#discussion_r431653465
########## File path: python/pyspark/sql/utils.py ########## @@ -75,21 +96,29 @@ class UnknownException(CapturedException): def convert_exception(e): s = e.toString() - stackTrace = '\n\t at '.join(map(lambda x: x.toString(), e.getStackTrace())) c = e.getCause() + + jvm = SparkContext._jvm + jwriter = jvm.java.io.StringWriter() + e.printStackTrace(jvm.java.io.PrintWriter(jwriter)) + stacktrace = jwriter.toString() Review comment: Seems like `getStackTrace` doesn't show the cause whereas `printStackTrace` shows it too. It's best to make it same as shown in the JVM anyway :-). ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org