Add concrete exception message in AsyncEntry#cleanCurrentEntryInLocal (#1047)
Signed-off-by: Eric Zhao <sczyh16@gmail.com>
This commit is contained in:
parent
4d9a5ef7f9
commit
9ff6e47bb0
|
|
@ -52,7 +52,11 @@ public class AsyncEntry extends CtEntry {
|
||||||
((CtEntry)parent).child = null;
|
((CtEntry)parent).child = null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException("Bad async context state");
|
String curEntryName = curEntry == null ? "none"
|
||||||
|
: curEntry.resourceWrapper.getName() + "@" + curEntry.hashCode();
|
||||||
|
String msg = String.format("Bad async context state, expected entry: %s, but actual: %s",
|
||||||
|
getResourceWrapper().getName() + "@" + hashCode(), curEntryName);
|
||||||
|
throw new IllegalStateException(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -74,7 +78,8 @@ public class AsyncEntry extends CtEntry {
|
||||||
.setOrigin(context.getOrigin())
|
.setOrigin(context.getOrigin())
|
||||||
.setCurEntry(this);
|
.setCurEntry(this);
|
||||||
} else {
|
} else {
|
||||||
RecordLog.warn("[AsyncEntry] Duplicate initialize of async context for entry: " + resourceWrapper.getName());
|
RecordLog.warn(
|
||||||
|
"[AsyncEntry] Duplicate initialize of async context for entry: " + resourceWrapper.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue