Skip to content

Commit

Permalink
Fix typos in error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitoy committed Oct 28, 2017
1 parent d8bc94a commit ffef76c
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pcap4j-core/src/main/java/org/pcap4j/core/PcapHandle.java
Original file line number Diff line number Diff line change
Expand Up @@ -506,15 +506,15 @@ public void setFilter(
}
if (rc < 0) {
throw new PcapNativeException(
"Error occured in pcap_compile: " + getError(),
"Error occurred in pcap_compile: " + getError(),
rc
);
}

rc = NativeMappings.pcap_setfilter(handle, prog);
if (rc < 0) {
throw new PcapNativeException(
"Error occured in pcap_setfilger: " + getError(),
"Error occurred in pcap_setfilter: " + getError(),
rc
);
}
Expand Down Expand Up @@ -757,13 +757,13 @@ public byte[] getNextRawPacketEx()
return dataP.getByteArray(0, pcap_pkthdr.getCaplen(headerP));
case -1:
throw new PcapNativeException(
"Error occured in pcap_next_ex(): " + getError(), rc
"Error occurred in pcap_next_ex(): " + getError(), rc
);
case -2:
throw new EOFException();
default:
throw new PcapNativeException(
"Unexpected error occured: " + getError(), rc
"Unexpected error occurred: " + getError(), rc
);
}
} finally {
Expand Down Expand Up @@ -916,14 +916,14 @@ private void doLoop(
break;
case -1:
throw new PcapNativeException(
"Error occured: " + getError(), rc
"Error occurred: " + getError(), rc
);
case -2:
logger.info("Broken.");
throw new InterruptedException();
default:
throw new PcapNativeException(
"Unexpected error occured: " + getError(), rc
"Unexpected error occurred: " + getError(), rc
);
}
} finally {
Expand Down Expand Up @@ -1056,15 +1056,15 @@ private int doDispatch(
switch (rc) {
case -1:
throw new PcapNativeException(
"Error occured: " + getError(),
"Error occurred: " + getError(),
rc
);
case -2:
logger.info("Broken.");
throw new InterruptedException();
default:
throw new PcapNativeException(
"Unexpected error occured: " + getError(),
"Unexpected error occurred: " + getError(),
rc
);
}
Expand Down Expand Up @@ -1154,14 +1154,14 @@ void loop(int packetCount, PcapDumper dumper)
break;
case -1:
throw new PcapNativeException(
"Error occured: " + getError(), rc
"Error occurred: " + getError(), rc
);
case -2:
logger.info("Broken.");
throw new InterruptedException();
default:
throw new PcapNativeException(
"Unexpected error occured: " + getError(), rc
"Unexpected error occurred: " + getError(), rc
);
}
} finally {
Expand Down Expand Up @@ -1251,7 +1251,7 @@ public void sendPacket(byte[] bytes, int len) throws NotOpenException, PcapNativ
int rc = NativeMappings.pcap_sendpacket(handle, bytes, len);
if (rc < 0) {
throw new PcapNativeException(
"Error occured in pcap_sendpacket(): " + getError(),
"Error occurred in pcap_sendpacket(): " + getError(),
rc
);
}
Expand Down

0 comments on commit ffef76c

Please sign in to comment.