mirror of
https://github.com/Qortal/qortal.git
synced 2025-02-12 02:05:50 +00:00
Improved logging when creating bootstraps, and catch/log all exceptions.
This commit is contained in:
parent
074cba2266
commit
edacce1bac
@ -60,7 +60,7 @@ public class BootstrapResource {
|
|||||||
bootstrap.validateBlockchain();
|
bootstrap.validateBlockchain();
|
||||||
return bootstrap.create();
|
return bootstrap.create();
|
||||||
|
|
||||||
} catch (DataException | InterruptedException | IOException e) {
|
} catch (Exception e) {
|
||||||
LOGGER.info("Unable to create bootstrap", e);
|
LOGGER.info("Unable to create bootstrap", e);
|
||||||
throw ApiExceptionFactory.INSTANCE.createCustomException(request, ApiError.REPOSITORY_ISSUE, e.getMessage());
|
throw ApiExceptionFactory.INSTANCE.createCustomException(request, ApiError.REPOSITORY_ISSUE, e.getMessage());
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,9 @@ public class Bootstrap {
|
|||||||
|
|
||||||
LOGGER.info("Generating checksum file...");
|
LOGGER.info("Generating checksum file...");
|
||||||
String checksum = Crypto.digestHexString(compressedOutputPath.toFile(), 1024*1024);
|
String checksum = Crypto.digestHexString(compressedOutputPath.toFile(), 1024*1024);
|
||||||
|
LOGGER.info("checksum: {}", checksum);
|
||||||
Path checksumPath = Paths.get(String.format("%s.sha256", compressedOutputPath.toString()));
|
Path checksumPath = Paths.get(String.format("%s.sha256", compressedOutputPath.toString()));
|
||||||
|
LOGGER.info("Writing checksum to path: {}", checksumPath);
|
||||||
Files.writeString(checksumPath, checksum, StandardOpenOption.CREATE);
|
Files.writeString(checksumPath, checksum, StandardOpenOption.CREATE);
|
||||||
|
|
||||||
// Return the path to the compressed bootstrap file
|
// Return the path to the compressed bootstrap file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user