mirror of
https://github.com/sbt/sbt.git
synced 2026-09-01 02:27:13 +02:00
Use java.lang.Throwable.setStackTrace. Proper fix for #543.
This commit is contained in:
committed by
Mark Harrah
parent
1c1e5c4977
commit
960d17c358
@@ -48,17 +48,15 @@ public class ForkMain {
|
||||
}
|
||||
}
|
||||
}
|
||||
static class ForkError extends Exception implements Serializable {
|
||||
static class ForkError extends Exception {
|
||||
private String originalMessage;
|
||||
private StackTraceElement[] originalStackTrace;
|
||||
private ForkError cause;
|
||||
ForkError(Throwable t) {
|
||||
originalMessage = t.getMessage();
|
||||
originalStackTrace = t.getStackTrace();
|
||||
setStackTrace(t.getStackTrace());
|
||||
if (t.getCause() != null) cause = new ForkError(t.getCause());
|
||||
}
|
||||
public String getMessage() { return originalMessage; }
|
||||
public StackTraceElement[] getStackTrace() { return originalStackTrace; }
|
||||
public Exception getCause() { return cause; }
|
||||
}
|
||||
static class ForkEvent implements Event, Serializable {
|
||||
|
||||
Reference in New Issue
Block a user