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/ctl/src/main/java/org/onosproject/ospf/controller/impl/OspfMessageEncoder.java b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/OspfMessageEncoder.java
index 98b6a6d..c457725 100644
--- a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/OspfMessageEncoder.java
+++ b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/OspfMessageEncoder.java
@@ -32,7 +32,7 @@
     private static final Logger log = LoggerFactory.getLogger(OspfMessageEncoder.class);
 
     @Override
-    protected Object encode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
+    protected Object encode(ChannelHandlerContext ctx, Channel channel, Object msg) {
 
         byte[] byteMsg = (byte[]) msg;
         log.debug("Encoding ospfMessage of length {}", byteMsg.length);