import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
import org.opendaylight.controller.netconf.api.NetconfMessage;
import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
import org.opendaylight.controller.netconf.api.NetconfMessage;
import org.opendaylight.controller.netconf.api.xml.XmlNetconfConstants;
- return xmlElement.getOnlyChildElement().getName().equals(XmlNetconfConstants.OK);
+ try {
+ return xmlElement.getOnlyChildElement().getName().equals(XmlNetconfConstants.OK);
+ } catch (DocumentedException e) {
+ throw new NetconfDocumentedException(e);
+ }
- return xmlElement.getOnlyChildElement().getName().equals(XmlNetconfConstants.RPC_ERROR);
+ try {
+ return xmlElement.getOnlyChildElement().getName().equals(DocumentedException.RPC_ERROR);
+ } catch (DocumentedException e) {
+ throw new NetconfDocumentedException(e);
+ }