Merge "NETCONF-557: Add support for URL capability"
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / utils / RestconfInvokeOperationsUtil.java
index c76c79d33f71e103e03db29fd02ed6a10f42421a..1f023c4ca74fe794e1bcfc3c996d336c44abf572 100644 (file)
@@ -28,7 +28,7 @@ import org.slf4j.LoggerFactory;
  * Util class for rpc.
  *
  */
-public class RestconfInvokeOperationsUtil {
+public final class RestconfInvokeOperationsUtil {
 
     private static final Logger LOG = LoggerFactory.getLogger(RestconfInvokeOperationsUtil.class);
 
@@ -97,12 +97,12 @@ public class RestconfInvokeOperationsUtil {
             if (response.getErrors().isEmpty()) {
                 return response;
             }
-            LOG.debug("RpcError message", response.getErrors());
+            LOG.debug("RpcError message {}", response.getErrors());
             throw new RestconfDocumentedException("RPCerror message ", null, response.getErrors());
         } catch (final CancellationException e) {
             final String errMsg = "The operation was cancelled while executing.";
-            LOG.debug("Cancel RpcExecution: " + errMsg, e);
-            throw new RestconfDocumentedException(errMsg, ErrorType.RPC, ErrorTag.PARTIAL_OPERATION);
+            LOG.debug("Cancel RpcExecution: {}", errMsg, e);
+            throw new RestconfDocumentedException(errMsg, ErrorType.RPC, ErrorTag.PARTIAL_OPERATION, e);
         }
     }