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/api/src/main/java/org/onosproject/ospf/controller/OspfMessage.java b/protocols/ospf/api/src/main/java/org/onosproject/ospf/controller/OspfMessage.java
index 9949146..460457f 100644
--- a/protocols/ospf/api/src/main/java/org/onosproject/ospf/controller/OspfMessage.java
+++ b/protocols/ospf/api/src/main/java/org/onosproject/ospf/controller/OspfMessage.java
@@ -17,6 +17,7 @@
import org.jboss.netty.buffer.ChannelBuffer;
import org.onlab.packet.Ip4Address;
+import org.onosproject.ospf.exceptions.OspfParseException;
/**
* Representation of an OSPF message.
@@ -48,9 +49,9 @@
* Reads from ChannelBuffer and initializes the type of LSA.
*
* @param channelBuffer channel buffer instance
- * @throws Exception might throws exception while parsing buffer
+ * @throws OspfParseException might throws exception while parsing buffer
*/
- void readFrom(ChannelBuffer channelBuffer) throws Exception;
+ void readFrom(ChannelBuffer channelBuffer) throws OspfParseException;
/**
* Returns OSPFMessage as byte array.