Remove DocumentedException.ErrorTag
[netconf.git] / netconf / mdsal-netconf-connector / src / main / java / org / opendaylight / netconf / mdsal / connector / ops / AbstractEdit.java
index f5126387b1ce4eb66829ce539414aeba92959334..41ac93f9fd82c3a6d843afb933e23c2da8ff2fee 100644 (file)
@@ -15,12 +15,12 @@ import java.util.Optional;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.transform.dom.DOMSource;
 import org.opendaylight.netconf.api.DocumentedException;
-import org.opendaylight.netconf.api.DocumentedException.ErrorTag;
-import org.opendaylight.netconf.api.DocumentedException.ErrorType;
 import org.opendaylight.netconf.api.NetconfDocumentedException;
 import org.opendaylight.netconf.api.xml.XmlElement;
 import org.opendaylight.netconf.mdsal.connector.CurrentSchemaContext;
 import org.opendaylight.yangtools.yang.common.ErrorSeverity;
+import org.opendaylight.yangtools.yang.common.ErrorTag;
+import org.opendaylight.yangtools.yang.common.ErrorType;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.XMLNamespace;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
@@ -62,7 +62,7 @@ abstract class AbstractEdit extends AbstractConfigOperation {
             xmlParser.traverse(new DOMSource(element.getDomElement()));
         } catch (final XMLStreamException | URISyntaxException | IOException | SAXException ex) {
             throw new NetconfDocumentedException("Error parsing input: " + ex.getMessage(), ex, ErrorType.PROTOCOL,
-                ErrorTag.MALFORMED_MESSAGE, ErrorSeverity.ERROR);
+                DocumentedException.MALFORMED_MESSAGE, ErrorSeverity.ERROR);
         }
     }
 
@@ -90,11 +90,8 @@ abstract class AbstractEdit extends AbstractConfigOperation {
                     element.getName()));
         if (schemaNode.isEmpty()) {
             throw new DocumentedException(
-                "Unable to find node " + elementName + " with namespace: " + namespace + "in module: "
-                    + module.toString(),
-                ErrorType.APPLICATION,
-                ErrorTag.UNKNOWN_NAMESPACE,
-                ErrorSeverity.ERROR);
+                "Unable to find node " + elementName + " with namespace: " + namespace + " in module: " + module,
+                ErrorType.APPLICATION, ErrorTag.UNKNOWN_NAMESPACE, ErrorSeverity.ERROR);
         }
 
         return schemaNode.get();