ObjectDirectory: extra logging on packfile exceptions
Display extra logging, including the exception with the associated stacktrace, whenever a packFile can't be read and thus removed from the packlist. Change-Id: I97a4e31dc427bfcc0baae438dcbe2dcd4704b824 Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
This commit is contained in:
parent
fafad4196d
commit
962babc4b2
|
@ -360,6 +360,7 @@ boolean hasPackedObject(AnyObjectId objectId) {
|
|||
// The hasObject call should have only touched the index,
|
||||
// so any failure here indicates the index is unreadable
|
||||
// by this process, and the pack is likewise not readable.
|
||||
LOG.warn("Unable to read packfile " + p.getPackFile(), e);
|
||||
removePack(p);
|
||||
}
|
||||
}
|
||||
|
@ -652,6 +653,7 @@ private void handlePackError(IOException e, PackFile p) {
|
|||
if ((e instanceof CorruptObjectException)
|
||||
|| (e instanceof PackInvalidException)) {
|
||||
warnTmpl = JGitText.get().corruptPack;
|
||||
LOG.warn("Packfile " + p.getPackFile() + " is corrupted", e);
|
||||
// Assume the pack is corrupted, and remove it from the list.
|
||||
removePack(p);
|
||||
} else if (e instanceof FileNotFoundException) {
|
||||
|
|
Loading…
Reference in New Issue