Skip to content

Commit

Permalink
improve exception handling messages, update Jar
Browse files Browse the repository at this point in the history
  • Loading branch information
gjwo committed Sep 5, 2020
1 parent 4467cc9 commit 83427b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Binary file modified Software/deployment/PowerMonitor.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void run()
e.printStackTrace();
if (this.bytes == null) {
this.bytes = new ArrayList<>();
System.err.println( "Null bytes in STM8PacketCollector");
System.err.println( "Null 'this.bytes' in STM8PacketCollector, recreated");
}
}
//accumulate packets for the period (assume top half of while is short time)
Expand All @@ -119,7 +119,9 @@ private Collection<byte[]> extractPackets(Collection<Byte> rawData)throws NullPo

/* Unbox Byte array to byte array */
byte[] data = new byte[rawData.size()];
for(Byte b: rawData) if(b!=null) data[dataIdx++] = b;
for(Byte b: rawData)
if(b!=null) data[dataIdx++] = b;
else System.err.println( "Null b in STM8PacketCollector");
/* Reset index */
dataIdx = 0;

Expand Down

0 comments on commit 83427b6

Please sign in to comment.