Refactor exception handling in the OSPF protocol
- removed unnecessary throws of Exception from methods
- converted throws of generic Exception to specific OspfParseException
Change-Id: I9d07167d92f221a234e9eba4c6082deb165afc0b
diff --git a/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/lsa/tlvtypes/RouterTlv.java b/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/lsa/tlvtypes/RouterTlv.java
index 83bf918..8ac443b 100644
--- a/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/lsa/tlvtypes/RouterTlv.java
+++ b/protocols/ospf/protocol/src/main/java/org/onosproject/ospf/protocol/lsa/tlvtypes/RouterTlv.java
@@ -71,9 +71,9 @@
* Reads bytes from channel buffer .
*
* @param channelBuffer channel buffer instance
- * @throws Exception might throws exception while parsing buffer
+ * @throws OspfParseException might throws exception while parsing buffer
*/
- public void readFrom(ChannelBuffer channelBuffer) throws Exception {
+ public void readFrom(ChannelBuffer channelBuffer) throws OspfParseException {
try {
byte[] tempByteArray = new byte[OspfUtil.FOUR_BYTES];
channelBuffer.readBytes(tempByteArray, 0, OspfUtil.FOUR_BYTES);