提交 b336aba3 authored 作者: Thomas Mueller's avatar Thomas Mueller

Improved error message.

上级 8499f80e
...@@ -76,6 +76,9 @@ public abstract class Task implements Runnable { ...@@ -76,6 +76,9 @@ public abstract class Task implements Runnable {
*/ */
public Exception getException() { public Exception getException() {
stop = true; stop = true;
if (thread == null) {
throw new IllegalStateException("Thread not started");
}
try { try {
thread.join(); thread.join();
} catch (InterruptedException e) { } catch (InterruptedException e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论