Merge "NETCONF-557: Add support for URL capability"
[netconf.git] / netconf / netconf-impl / src / main / java / org / opendaylight / netconf / impl / osgi / NetconfOperationRouterImpl.java
index ee712b78c3a8d1bf421f2f2dab784105713f74a2..65a96e7583a8b1d19ecd4231a21788c5745b7a32 100644 (file)
@@ -79,24 +79,23 @@ public class NetconfOperationRouterImpl implements NetconfOperationRouter {
                     tag, DocumentedException.ErrorSeverity.ERROR,
                     Collections.singletonMap(tag.toString(), e.getMessage()));
         } catch (final RuntimeException e) {
-            throw handleUnexpectedEx("Unexpected exception during netconf operation sort", e);
+            throw handleUnexpectedEx("sort", e);
         }
 
         try {
             return executeOperationWithHighestPriority(message, netconfOperationExecution);
         } catch (final RuntimeException e) {
-            throw handleUnexpectedEx("Unexpected exception during netconf operation execution", e);
+            throw handleUnexpectedEx("execution", e);
         }
     }
 
     @Override
-    public void close() throws Exception {
+    public void close() {
         netconfOperationServiceSnapshot.close();
     }
 
-    private static DocumentedException handleUnexpectedEx(final String message, final Exception exception) throws
-            DocumentedException {
-        LOG.error("{}", message, exception);
+    private static DocumentedException handleUnexpectedEx(final String op, final Exception exception) {
+        LOG.error("Unexpected exception during netconf operation {}", op, exception);
         return new DocumentedException("Unexpected error",
                 DocumentedException.ErrorType.APPLICATION,
                 DocumentedException.ErrorTag.OPERATION_FAILED,