Skip to content

Commit

Permalink
Convert both exception message and stack trace to string
Browse files Browse the repository at this point in the history
  • Loading branch information
tdas committed Aug 17, 2016
1 parent dafdbb6 commit 60eabcc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class StreamExecution(
} finally {
state = TERMINATED
sparkSession.streams.notifyQueryTermination(StreamExecution.this)
postEvent(new QueryTerminated(this.toInfo, exception.map(_.getMessage)))
postEvent(new QueryTerminated(this.toInfo, exception.map(_.cause).map(Utils.exceptionString)))
terminationLatch.countDown()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ class StreamingQueryListenerSuite extends StreamTest with BeforeAndAfter {
// Make sure that the exception message reported through listener
// contains the actual exception and relevant stack trace
assert(!listener.terminationException.get.contains("StreamingQueryException"))
assert(listener.terminationException.get.contains("terminated with exception"))
assert(listener.terminationException.get.contains("java.lang.ArithmeticException"))
assert(listener.terminationException.get.contains("StreamingQueryListenerSuite"))
}
Expand Down

0 comments on commit 60eabcc

Please sign in to comment.