Skip to content

Commit

Permalink
Re #856: using out of space code on exit from TaskImportBlocks.java
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandraRoatis committed Mar 21, 2019
1 parent fe7a3ea commit bd1e4e7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modAionImpl/src/org/aion/zero/impl/sync/TaskImportBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.aion.p2p.P2pConstant;
import org.aion.types.ByteArrayWrapper;
import org.aion.zero.impl.AionBlockchainImpl;
import org.aion.zero.impl.SystemExitCodes;
import org.aion.zero.impl.db.AionBlockStore;
import org.aion.zero.impl.sync.PeerState.Mode;
import org.aion.zero.impl.sync.statistics.BlockType;
Expand Down Expand Up @@ -268,8 +269,8 @@ private PeerState processBatch(PeerState givenState, List<AionBlock> batch, Stri
log.error("<import-block throw> ", e);

if (e.getMessage() != null && e.getMessage().contains("No space left on device")) {
log.error("Shutdown due to lack of disk space.");
System.exit(0);
log.error("Shutdown due to lack of disk space.", e);
System.exit(SystemExitCodes.OUT_OF_DISK_SPACE);
}
break;
}
Expand Down Expand Up @@ -702,8 +703,8 @@ private int importFromStorage(PeerState state, long first, long last) {
log.error("<import-block throw> ", e);
if (e.getMessage() != null
&& e.getMessage().contains("No space left on device")) {
log.error("Shutdown due to lack of disk space.");
System.exit(0);
log.error("Shutdown due to lack of disk space.", e);
System.exit(SystemExitCodes.OUT_OF_DISK_SPACE);
}
}
}
Expand Down

0 comments on commit bd1e4e7

Please sign in to comment.