Skip to content

Commit

Permalink
Merge pull request real-logic#774 from anotherchrissmith/timestamp-st…
Browse files Browse the repository at this point in the history
…acktraces

[Java] Print timestamp with stacktraces in DEFAULT_ERROR_HANDLER
  • Loading branch information
mjpt777 authored Dec 9, 2019
2 parents 926aa34 + 023b8b5 commit a9c0db9
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions aeron-client/src/main/java/io/aeron/Aeron.java
Original file line number Diff line number Diff line change
Expand Up @@ -521,12 +521,16 @@ public static class Configuration
public static final ErrorHandler DEFAULT_ERROR_HANDLER =
(throwable) ->
{
throwable.printStackTrace();
if (throwable instanceof DriverTimeoutException)
synchronized (System.err)
{
System.err.printf(
"%n***%n*** timeout for the Media Driver - is it currently running? exiting%n***%n");
System.exit(-1);
System.err.println(System.currentTimeMillis() + " Exception:");
throwable.printStackTrace();
if (throwable instanceof DriverTimeoutException)
{
System.err.printf(
"%n***%n*** timeout for the Media Driver - is it currently running? exiting%n***%n");
System.exit(-1);
}
}
};

Expand Down

0 comments on commit a9c0db9

Please sign in to comment.