Improved error logging in BlockArchiveUtils.importFromArchive()

This commit is contained in:
CalDescent 2023-03-12 19:08:57 +00:00
parent e4f45c1a70
commit a4551245cb

View File

@ -1,5 +1,7 @@
package org.qortal.utils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.qortal.data.at.ATStateData;
import org.qortal.data.block.BlockData;
import org.qortal.data.transaction.TransactionData;
@ -12,6 +14,8 @@ import java.util.List;
public class BlockArchiveUtils {
private static final Logger LOGGER = LogManager.getLogger(BlockArchiveUtils.class);
/**
* importFromArchive
* <p>
@ -87,7 +91,8 @@ public class BlockArchiveUtils {
} catch (DataException e) {
repository.discardChanges();
throw new IllegalStateException("Unable to import blocks from archive");
LOGGER.info("Unable to import blocks from archive", e);
throw(e);
}
}
repository.saveChanges();